Dear friends,
<preamble>
in real life I am a medical doctor and as my dark secret I do some programming to take a break from my main job and "distract" myself from it.
I have been playing with OpenAPI a little and find the whole concept of "API first" programming really attractive.
I my probably limited understanding if I take some time to define the APIs and the related data model I can then ensure that BOTH the backend and front-end developers rely on that to develop their stuff right?
For the backend I've been generating flask-servers and using an Atlas MongoDB and all is cute and fine.
</preamble>
What I'm trying to understand is if there's a toolchain to speed up a front-end development coherent with the API and its data model.
Currently I'm just using the datamodel to build forms and stuff like that but if I did change something in the API or datamodel I currently have to manually review the forms to be sure they reflect the new data.
Is it possible if not automating at least to help in this fronted to API/model consistency?
Hope this is not too dumb a question. Thanks in advance.
Solved! Go to Solution.
It depends on the version of the codegen that you use (which depends on the version of specification you use). You can take a look at https://github.com/swagger-api/swagger-codegen#modifying-the-client-library-format and the following header to learn how to customize the codegen. There *are* html/js templates, but they may not suit your needs. However, you can take a look at them and use them as a baseline.
Very valid question.
Generally speaking, you can use code generators like Swagger Codegen to automate the process of creating boilerplate code. Note that the existing templates may not address your needs out of the box. However, since the templates are highly customizable, you can simply modify them to your own needs and keep using them.
Well thanks for letting me know I'm not totally misunderstanding 🙂
I use Codegen to generate the Flask backend but could not find/understand how to use it to also generate a "boilerplate" of an HTML/JS frontend ... is this possible? Can you suggest some further reading/ideas?
Take care
It depends on the version of the codegen that you use (which depends on the version of specification you use). You can take a look at https://github.com/swagger-api/swagger-codegen#modifying-the-client-library-format and the following header to learn how to customize the codegen. There *are* html/js templates, but they may not suit your needs. However, you can take a look at them and use them as a baseline.
Thanks a lot! Will study 🙂
Even in my beginner's understanding I see how Smartbear's products and architecture caters for robust API design and implementation but also feel that if I'm not also facilitating the front-end developers the idea of API First philosophy might be weakened.
Subject | Author | Latest Post |
---|---|---|