-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Ability to set "schemes" programatically #433
Comments
I'm happy to take a stab at this by the way! |
PR is welcome 👍 |
So it looks like all the other configurations which can be set programmatically are being set in a template, within a template - gen.go. The intermediate template variables are being set in the parser. These are being set on the SwaggerProps struct of upstream go-openapi/spec repository. Unfortunately I can't figure out a way to set up a template representation of the array of schemes in the second link (parser) such that it can be stored in the Definitely a bit of a roadblock, any ideas on how this could be worked around? Possibly an option is to make use of the |
I've just created a PR for this. Good luck! |
fix via #438 |
Is your feature request related to a problem? Please describe.
A service i'm working on requires scheme to be http for local development, and preferably only https once its deployed. If the
schemes
could be controlled programatically, this would be possible!Currently I can only set schemes to
https http
to make this work; and its a lose lose, because locally, I need to switch it to http to get requests working, and when deployed, http is still an option even though I don't want it to be one.Describe the solution you'd like
Add an option to the
SwaggerInfo
struct created in #220 to set the scheme.Describe alternatives you've considered
Open to other options people might think of.
The text was updated successfully, but these errors were encountered: