-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Allow more granularity in paramater naming convention configuration #367
Comments
Hi @araki-nobuteru! This is currently how it works, but maybe the naming of the parameter is a little bit different than what you were expecting. If you check the readme, you will see this in the documentation: As you can see, you can specify the type of naming convention for the I'm not sure why we chose Therefore, I think you have everything you need. Give it a try and let us know if everything is working as expected. |
Hi @JFCote! I think I didn't make myself clear when describing the problem. Here are more details with an example. In the project I working we have to follow a naming convention that specifies the following:
I created an API spec to illustrate the idea for the feature I suggested and this API has the following paths: The When I run the validator using the spec and the options above, I get the following errors: The point is that the validator is validating path parameters and query parameters using the same naming convention. So, what I would like to have is an option to specify different naming conventions for each type of parameter. I hope I could make myself clear now 😃 Thanks! |
You are absolutely right and I was mistaken! The So I guess it would make sense to have something like this:
The following parameters would become deprecated but still accepted for a couple of versions:
Would that follow your requirements? |
Hi @JFCote! Yes, I think this configuration will address the requirement. Just a question: what you called cookie parameters would be the formData parameters? |
Hi @araki-nobuteru , OpenAPI V3 only support 4 types which is: But since we want to support OpenAPI V2, I will need to think about it a little more since in V2 we have more type: I'm kind of in a rush right now, if you have any idea how to tackle this, let me know! |
Hi @JFCote , I'm fiddling with the code as I have some free time. My initial suggestion is to add another parameter in the
I'll let you know if some different idea comes to my mind. |
Hi folks!
I'd like to have the possibility to configure the paramater naming convention in a more granular way.
The tool currently validates all types of parameters (path, query string, body, form) using the same name convention. The ideia is to allow an individual configuration for each type of parameter.
Something like the snippet below in
options.json
file:If the user doesn't specify the naming convention for some parameter type, the would consider a default convention.
Does this idea make sense?
Thank you!
The text was updated successfully, but these errors were encountered: