We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For query parameter, using a type array and items property containing $ref to definition of the object is not validated.
swagger: "2.0" info: version: 1.0.1 title: API description: API contact: name: Api team basePath: /api schemes: - http consumes: - application/json produces: - application/json paths: /getSomething: get: operationId: getSomething parameters: - name: type in: query required: false type: array items: $ref: '#/definitions/myType' responses: default: description: unexpected error schema: type: string definitions: myType: type: string enum: ["ab", "cd", "ef"]
I get that from validator :
{ "schemaValidationMessages": [ { "level": "error", "domain": "validation", "keyword": "oneOf", "message": "instance failed to match exactly one schema (matched 0 out of 2)", "schema": { "loadingURI": "http://swagger.io/v2/schema.json#", "pointer": "/definitions/parametersList/items" }, "instance": { "pointer": "/paths/~1getSomething/get/parameters/0" } } ] }
This doesn't work as well without enum property in the myType definition.
In my case, I need to define myType as an enum once, and refer to it from the parameter definition.
The text was updated successfully, but these errors were encountered:
@danjor - that's not supported by the spec. See OAI/OpenAPI-Specification#300.
Sorry, something went wrong.
No branches or pull requests
For query parameter, using a type array and items property containing $ref to definition of the object is not validated.
I get that from validator :
This doesn't work as well without enum property in the myType definition.
In my case, I need to define myType as an enum once, and refer to it from the parameter definition.
The text was updated successfully, but these errors were encountered: