Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

Do not default operation id to controller method name. #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jaapterwoerds
Copy link

Fixes #181

@gaeljw
Copy link

gaeljw commented Jul 11, 2020

According to OAS, the operationId should be:

Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.

Thus I don't think setting to null by default would be a good idea.

Moreover, even though it's "implementation detail" the method name should convey at least a bit of information that null won't convey at all.

That being said, I realize that controller method name is not guaranteed to be unique but it has a limited risk of duplicates. Maybe one improvement would be to prefix it with the controller name itself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

operationId should not default to controller method name
2 participants