-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[REQ] Standardize vendor extension naming conventions #4976
Comments
We mention the naming convention in https://github.com/OpenAPITools/openapi-generator/blob/master/CONTRIBUTING.md#style-guide
Maybe we can write a script to match these vendor extensions and make sure it's following kebab-case as part of the CI. |
I agree with the script, but there are a couple other points I mentioned which I think need clarification:
I wonder if it might be possible to store vendor extensions and descriptions in a map, and allow dumping this map by a |
I think that's what we suggest at the moment e.g. x-objc-operation-id, x-java-feign-retry-limit
Yes, I don't think the users have kept it up-to-date.
Don't prefer another option. What about showing it in
Instead of documenting these extensions in the wiki, we can of course store it somewhere else such as a map as you've pointed. I think the key challenge is who's going to keep it up-to-date?? Did you get complaints from users about vendor extensions not documented properly? |
@wing328 In the linked issue where I referenced this one, I reviewed our wiki before proposing the change to Regarding putting the extensions on |
In my case, it wasn't a "complaint". I was evaluating which tool to use (oss and commercial). The limited documentation of open API tools was definitely a struggle, including lack of vendor extensions, though in the end I did end up using it. |
You've probably already found this in documentation, but you can currently get details about what's bound to templates using the debug system properties (e.g. I'm working on https://github.com/OpenAPITools/openapi-generator/projects/5 which is aimed at decoupling much of our code, documentation, and spec support. At it's core, that project is aiming to reduce ramp-up time and make community contributions easier. This is why I've also been working to improve documentation, make info more discoverable, and remove confusion in some areas. I might rename the project and assign more of the closed PRs to the project to make the process more transparent. |
Three parts to this:
|
Is your feature request related to a problem? Please describe.
Vendor extensions are not intuitive, and are case sensitive. They're also not fully documented on the wiki at https://github.com/OpenAPITools/openapi-generator/wiki/Vendor-Extensions
Describe the solution you'd like
x-objc-operationid
rather thanx-objc-operationId
).x-objc-operation-id
rather thanx-objc-operationid
).Describe alternatives you've considered
none
Additional context
The issue is apparent in a vendor extension such as
x-mysqlSchema
. If someone mistakenly defines this asx-mysql-schema
orx-mysqlschema
, the configuration will not be accepted. However, if we normalize from the currentx-mysqlSchema
to kebab-cased then lower-case this, the result isx-mysql-schema
.Test examples:
We could easily make the change in 5.0 and maintain currently documented extensions. We'd want to wait for 5.0, though, because templates will need to be updated to lower cased vendor extensions.
The text was updated successfully, but these errors were encountered: