swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
Generate the swift3 code with a YAML file that contains settings for jtw security as source
check the swift3 methods generated, it'd be not possible to pass the token
Suggest a fix/enhancement
I'm trying to fix this but I'm not sure about what files to touch first.
My grasp is to edit src/main/resources/swift3/api.mustache and check for {{#authMethods}} inside the class open func definition.
If there is any authMethod defined, than I can read some value and add them to headers.
Is that right?
Description
Looks like the swagger-codegen for Swift3 ignores the Security settings and doesn't add any chance to pass the headers to the methods.
Swagger-codegen version
2.3.0
Swagger declaration file content or url
Yaml:
Generated methods:
Command line used for generation
swagger-codegen generate -l swift3 -o destination/path -i ./swagger.yaml
Steps to reproduce
Suggest a fix/enhancement
I'm trying to fix this but I'm not sure about what files to touch first. My grasp is to edit
src/main/resources/swift3/api.mustache
and check for{{#authMethods}}
inside theclass open func
definition. If there is any authMethod defined, than I can read some value and add them to headers. Is that right?Thanks, Alessandro