Closed StarProxima closed 11 months ago
I think you can do something similar
optional_id_for_method_name
As you have only the opposite.
I think you can do something similar
optional_id_for_method_name
As you have only the opposite.
How exactly should the flag with the word 'optional' work?
Specifically in my case the operationId is composed as summary + path. It is not very clear what id
means in this case.
I'm not sure that the optional_id_for_method_name
wording will make it clear to users how the flag works.
Maybe something like only_path_for_method_name
?
If I'm misunderstanding, can you tell me in more detail what you mean?
Something like this code
if (thisBoolVariable) {
requestName = (key + path).toCamel
}
Okay, got it. I'll try to implement it this week.
What's the final name and description for the flag?
path_method_name : false
This feature request is related to https://github.com/Carapacik/swagger_parser/issues/83.
Proposal
Add a flag to the swagger_parser configuration that leaves only path in the method name.
Motivation
Sometimes the summary in OpenAPI can be irrelevant (invalid, too long or short, in a different language), which can be confusing when searching for the right method in the api client.
The optional flag will leave only path in the name, which will allow better navigation through the code.
Suggested behavior
Current method generation:
Proposed method generation:
OpenAPI: