-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
Suppose we have such OpenAPI document which served by location http://example.com/openapi/desc
servers:
- url: 'http://example.com/'
components:
schemas:
Pet:
type: object
required:
- petType
properties:
petType:
type: string
discriminator:
propertyName: petType
mapping:
dog: Dog
Cat:
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
# all other properties specific to a `Cat`
properties:
name:
type: string
Dog:
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
# all other properties specific to a `Dog`
properties:
bark:
type: string
Lizard:
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
# all other properties specific to a `Lizard`
properties:
lovesRocks:
type: boolean
it is not clear what mean Dog in the mapping subscheme.
Variants:
- http://example.com/openapi/Dog (accroding to base uri http://example.com/openapi/desc)
- #/components/schemas/Dog
If i have subschema in another url (http://example.com/openapi/Dog) thеn Dog is relative link.
If i have subschema in components thеn Dog is #/components/schemas/Dog (which is also a relative link, but different)
How to correctly determine that Dog is a relative link or subschema in #/components/schema?
Sorry for bad english.