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
Unused public struct Options #85
Comments
Generating header parameters is unfortunately not supported yet. This issue tracks that addition #9 In terms of them not being required, that is controlled in the swagger spec. In your spec they are all marked as |
In that case it should not be mandatory to build SignUp Model... Parameter that needs to be added in request should be optional for model or request |
I wasn't aware that POST bodies could be optional. Is your |
No But to build the SignupRequestModel "option" parameter should not be mandatory ... i.e. SignupRequestModel class can have constructor where option argument can be passed as nil. Thanks |
Ahh I understand. You can use the convenience init for passing in specific Option values. As they are all optional you don't need to specify them.
|
Let me know if that doesn't work or you have any other issues. Closing for now |
I am using your tool to generate my API only one thing is not clear to me is how to authorise some request My server uses Bearer Token for authorise user... how should i use authorise protocol ? Right now i am just putting it in header Authorisation like
But not sure if this is the right way and if it is than what is the use of |
@mihirpmehta how you're doing it is fine. The Mind you |
I have generated the code for my Swagger... In the generated code there are struct Options are generated for header field
that option are nowhere being set in the header anywhere.
to initialise the request those value in option are required which is not being set in header field.
Also i think those value should not be required in creating request
My swagger yml is at http://relatr-dev.westeurope.cloudapp.azure.com:8080/swagger/
You can refer the Signup request in which languageCode: and appVersion are required parameters for creating requesting but those are header parameters
The text was updated successfully, but these errors were encountered: