-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
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
Multiple types support for parameters #401
Comments
Link to parent #565 |
Now that we're working to include full JSON Schema support #741, and we have schema support for parameters #654, wouldn't we be able to handle this in the schema definition?
...
"parameters": [
{
"name": "myParameter",
"in": "query",
"schema": {
"$ref": "parameterSchema.json"
}
}
]
{
"oneOf":
[
{
"type": "string"
},
{
"type": "integer"
}
]
} |
This can now be done with |
It's described in the Inheritance and Polymorphism section of the OpenAPI documentation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a parameter that can be more than one type. (Consider an endpoint that takes an arbitrary key (string) and value (string, number or boolean) parameters and store them in a database.) It seems "parameter" object requires "type" field name and the value of "type" field must be one of "string", "number", "integer", "boolean", "array" or "file". Currently, I'm stuck with this problem since there's no workaround.
The text was updated successfully, but these errors were encountered: