-
Notifications
You must be signed in to change notification settings - Fork 15
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
sort - order request parameters by name #82
Comments
Usually the parameters are used as |
I have a PR ready for this, but I wonder if people expect this to be sorted or rather want to keep it in the order that they defined it? Since it might be linked to a priority related to the business rules? Example before: '/pet/{petId}/uploadImage':
post:
operationId: uploadFile
summary: uploads an image
description: ''
parameters:
- required: true
schema:
type: integer
format: int64
name: petId
in: path
description: ID of pet to update
- required: false
schema:
type: string
name: additionalMetadata
in: query
description: Additional Metadata
/user/login:
get:
parameters:
- required: false
schema:
type: string
name: username
in: query
description: The user name for login
- required: false
schema:
type: string
name: password
in: query
description: The password for login in clear text Example after: '/pet/{petId}/uploadImage':
post:
operationId: uploadFile
summary: uploads an image
description: ''
parameters:
- required: false
schema:
type: string
name: additionalMetadata
in: query
description: Additional Metadata
- required: true
schema:
type: integer
format: int64
name: petId
in: path
description: ID of pet to update
/user/login:
get:
parameters:
- required: false
schema:
type: string
name: password
in: query
description: The password for login in clear text
- required: false
schema:
type: string
name: username
in: query
description: The user name for login |
Did you had some time to review the PR and the question above? |
Hi - thanks! Ours swagger.json is generated from either golang protoc or Python ApiSpec hence why I think we don't see the $ref. Really our main use-case then is a cross-check reviewing the changes vs the previous version before installing the swagger.json into Apigee. No business rule ordering as such. But in any case this sort would be the up to the end-user right, depending on whether they choose to configure it this way, or not. No-one is forced into anything they don't want. |
@ed-randall-blk @edrandall It has been a while, but is there still a need to be able to sort header & param items by alphabet? We are introducing the option to sort Paths, in a similar config we could provide the option controlling the header & param items. |
I couldn't figure out how to do this.
I need the get, post etc. request parameters to be ordered by the value of the
name
field.The parameter fields themselves are ordered consistently according to the config but I'd like the the parameter ordering itself to be alphabetical.
The text was updated successfully, but these errors were encountered: