-
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
can a parameter be used both for query and path? #965
Comments
seralf
changed the title
can a parameter be both for query and path?
can a parameter be used both for query and path?
Mar 6, 2017
With OpenAPI 2.0 or OpenAPI 3.0 this is not possible. I also don't think this would work for required parameters like in your example ... it can only be a path parameter in the first path, and only be a query parameter in the second path. I could imaging having the same definition for a form and query parameter (or possibly also header parameter, though there I would imagine a different name). |
thank you, I will continue with the double definition, then
2017-03-06 17:06 GMT+01:00 Ron <notifications@github.com>:
… Closed #965 <#965>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#965 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFYfJfZgtPAxbO0loyNqcaw6gUchSPlks5rjC7ugaJpZM4MUSyE>
.
|
Closed
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm trying to organize better my parameter definition.
Given two paths:
I wonder if it's possible to maintain a single re-usable definition for a parameter wich can be used either as path parameter or query parameter.
My problem is that I have multiple endpoints which re-use the same parameters, and sometimes both the structures are present! Since the general definition is helpful (it allows me to define default values which can be used to suggest meaningful examples to test), I'd like to avoid a twin definition just to specify the type of a parameter...
at the moment I have something like:
and I wish I'd have something like:
thanks in advance for any suggestion
The text was updated successfully, but these errors were encountered: