Hi everyone,
I'm still new to swagger and I have the following problems :
- Arrays are not parsed correctly
what happens is when I make a request containing any sort of non-empty array, it's rejected. So I guess it's not parsed correctly. See my yaml example below :
Items:
type: array
maxItems: 10
items:
$ref: '#/definitions/ItemDefinition'
with ItemDefinition being a simple object with string properties.
also
- oneOf/anyOf do not work in swagger editor, this generates errors such as "should NOT have additional properties. additionalProperty : anyOf". (or oneOf)
Identity:
type: object
properties:
"firstName":
type: string
"lastName":
type: string
"nationality":
type: string
"title":
type: string
"identityProof":
type: string
"identityNumber":
type: string
IdentityES:
allOf:
- $ref : '#/definitions/Identity'
- properties:
"secondaryLastName":
type: string
CustomerInformation:
type: object
properties:
"identity":
anyOf:
- $ref: '#/definitions/Identity'
- $ref: '#/definitions/IdentityES'
I've tried putting
discriminator: "identity_type"
in Identity but still the API doesn't "recognize" an incomming IdentityES, thus filtering the secundaryLastName property.
I saw that these problems should be resolved thanks to Open API 3.0, and that swagger should support this version of OpenAPI but still I cannot get this to work.
So here are my questions :
- Is OpenAPI 3.0 really supported by swagger ? I googled and found out it does, but it's not that clear (at least to me, English not being my native language // also being a newbie to swagger)
- Is there any workaround that i can do to make this work ?
I'm using swagger online editor to generate aspdotnet classes, visual studio cs for the api, soap UI for sending requests. hope everything's clear enough.