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
Contributed templates #1625
Comments
Hello Michael and thank you for willing to contribute. A few remarks:
I am not sure about this one. Should be discussed with @casualjim. Best of course would be to provide a plugin mechanism, but we are a bit far away from this.
Defaults settings for alternate template sets should be handled in the corresponding |
Why plural?
We don't really understand what you mean here.
This is what we discussed in the Slack as the current solution, if there is an alternative in mind, we are willing to implement it.
This is more or less what was implemented in #1626 , right? |
Hello @posener Plural because I think that there are more than one way to produce supplementary sets of templates, and moreover, you provide more than one template. It is actually a whole set of new templates. For instance, I might contribute just like you my own templates to generate tests for operations. What I mean is something like
Yep. I wrote this comment before I reviewed the PR. I made some comments about some details, but I agree with the principle. |
Add new feature to support contributed templates.
As a result of https://github.com/Stratoscale/swagger and after discussion with @fredbi we would like to add an option for defining "contributed" templates which will be delivered with the swagger binary.
The suggested solution is to add a
--template
flag to the generate command, and specify the contributed template name. This will result in overriding the default templates from templates which are included in the binary.This solution also need to give a way for custom templates to control the generated options, such as excluding main or rewriting the configureapi file.
The text was updated successfully, but these errors were encountered: