Skip to content

Polymorphism in Response.schema #220

Closed
@mission-liao

Description

@mission-liao

In this example, If I want to instantiate a 'Cat' Schema object, I would need to assign 'Cat' to 'petType' property to make others know it's a Cat object.

If I have a Responses object like this, when I need to convert the return value based on its Schema object, what value should I assign to 'petType'?

{
  default: {
    schema: {
      allOf:[
        { $ref: #/definitions/Pet }
        { properties: {...} }
      ]
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions