DapperDox / dapperdox

Beautiful, integrated, OpenAPI documentation.
http://dapperdox.io
GNU General Public License v3.0
409 stars 59 forks source link

Support oneOf for Schema Objects #113

Open IntegrationMike opened 5 years ago

IntegrationMike commented 5 years ago

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