Skip to content

Support oneOf for Schema Objects #113

@IntegrationMike

Description

@IntegrationMike

Open API now supports oneOf, though only for schema objects, however dapper does not appear to support it even for schemas

OpenAPI 3.0:
https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/

When I mimic that format:

"responses": {
  "200": {
    "description":"Text",
    "schema": {
      "oneOf":[
        {
          "$ref": "http://localhost:3123/definitions.json#/definitions/allowedParameters"
        },
        {
          "$ref": "http://localhost:3123/definitions.json#/definitions/calculatedPayment"
        }
      ]
    }
  },
}

I get
Error: POST /api/vehicles/allowedParameters references a model definition that does not have a title member.

I'm sure this has been asked before, but I have often wondered by dapperdox insists that I use the key "definitions" instead of "schemas" so if someone could explain that to me as well that would be wonderful :D

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