-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add mustache templates #96
base: main
Are you sure you want to change the base?
Conversation
server/openapi_server/core/controllers/text_date_annotation_controller.py
Outdated
Show resolved
Hide resolved
@thomasyu888 Below is listed the files created/updated after running |
The only difference is |
I think I remember generating code base with version 5.0.1 specified in the file VERSION. Maybe I forgot to reinstall my npm dependencies in this repository. |
…nnotator-example into add-mustache-templates
I'm trying to identify how this PR would affect the update of a tool when a new version of the API specification is available.
@thomasyu888 I think that the complexity that comes with adding the mustache templates to the tool examples AND with maintaining/updating these templates may puzzle developers. At this point I'm trying to figure out when is using mustache template a good/bad idea. If the API specification changes often, there is cost as one would need to update the template first, then update the codebase based on the new template. This sounds cumbersome. What is your thought? |
After discussing with @thomasyu888, we identified that using mustache templates simplifies the process of updating a tool when a new tool API specification release is available but comes at the cost of making the development of the initial version of the tool more complex. We consider that it's more important for developers to be able to develop the first version of their tool easily. Therefore, we will put the template on the back burner for now, potentially mentioning them in an "advanced" section of the tutorial. |
Fixed #95 , linting is slightly an issue. Unfortunately the template doesn't necessarily generate beautifully linted code, but the idea with using the templates is that only code in the
openapi_server.core
module is ever edited, everything else remains the same from however the generator creates it.I added
openapi_server.controllers/*.py
as the list of files forflake8
to ignore