Open pvdbosch opened 4 months ago
I'm wondering about the "RECOMMENDED to follow common programming naming conventions".
Doesn't that mean it would depend on the targeted programming language:
Or do code generators generally take care of converting operationId getEnterprise to GetEnterprise for C#, and get_enterprise for python?
openapi-generator seems to convert to language-specific conventions, tested with python-flask,
e.g. operationId: getOneOfTwoStrings
=> def get_one_of_two_strings()
it also generates an openapi.yaml file with the operationId replaced this converted method name
Works for other elements as well (without modification in the openapi), e.g.:
Parameter name 'paramObject' is not consistent with Python variable names. It will be replaced by 'param_object'
WG: OK to mandate operationId. Prefer to have lowerCamelCase as naming convention, consistent with property naming convention.
Add a guideline that operationId MUST be present for each operation:
Empty operationId found for path: get /someResource. Renamed to auto-generated operationId: someResourceGet
Further guidelines in the OpenAPI spec about the operationId seem sufficiently clear (we refer or copy them):