OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
I have noticed that all methods in the resulting SDK have default values for their parameters, even for those that are marked as required in the swagger.json. Here's an example:
/// <param name="tutorialName">tutorialName (required).</param>
public CreateTutorialRaceBody(string tutorialName = default(string))
This seems strange because mandatory parameters shouldn't have default values.
I expect mandatory parameters not to have default values in the generated code.
Is there a solution to this issue? Perhaps I am missing something or there are additional parameters that I should be using?
Hello,
I am using openapi-generator to create an SDK for Unity. Here is my generation script:
I have noticed that all methods in the resulting SDK have default values for their parameters, even for those that are marked as required in the swagger.json. Here's an example:
This seems strange because mandatory parameters shouldn't have default values.
I expect mandatory parameters not to have default values in the generated code.
Is there a solution to this issue? Perhaps I am missing something or there are additional parameters that I should be using?
Thanks