0
class IBMVolumeCRN(Schema):
    crn = String(validate=Length(min=1), description="The CRN for this Volume",
                 example="crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5")

class IBMResourceRefSchema(Schema):
    id = String(example=uuid.uuid4().hex, validate=Length(equal=32))

class IBMVolumeHREF(Schema):
    href = String(example="https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose")


class A(Schema):
    volume = Nested(OneOf([IBMVolumeHREF, IBMVolumeCRN,IBMResourceRefSchema]))
4

0 回答 0