跳至主要内容

博文

目前显示的是 十一月, 2021的博文

clean up docker images daily and weekly

Here’s the crontab content I used @daily docker rmi `docker images -f dangling=true -q` @weekly docker rmi `docker images -f 'reference=100.98.97.206/*/*-ui:*' --format "{% raw %}{{.Repository}}:{{.Tag}}{% endraw %}"` reference document https://docs.docker.com/engine/reference/commandline/images/#filtering

My openapi workflow

The workflow I am trying to work with Recently, I was working on bring openapi to my workflow to minimize the API related effort on Restful project. My goal was to using openapi generator to generate client and server interface stubs. Then using this generated code as SDK in both frontend and backend so that I will not have to deal with HTTP and the restful details. My Goal No more restful coding API spec to code auto generation Minimized code maintenance effort Generate client and server code from same spec Multiple languages and framework support, vue, pure js, springboot, springboot-jersy Easy to regenerate at anytime. My project structure It feels like openapi-generator-cli fit my needs very well. At present, I only have one API spec file, So I just named it 'openapi.yaml'. In the future, if it requires me to split my openapi spec, I'll put them into a subdirectory named 'openapi'. As the openapi-generator-cli has a configuration param

Where to find information of OpenAPI tools and steps to setup and run OpenAPI generator

All about the OpenAPI tools The OpenAPI tools are derived from swagger tools. They feels almost identical to new comer. The tool enables automatic generation of API documents and server-client interface libraries. Unlike the swagger tools, OpenAPI tools are more open there¡¯re all kinds of groups developed different kinds of tools base on the OpenAPI SPEC. While there¡¯re too many choices, it also brings difficulties to new user to getting start with the OpenAPI. Documents to read This is a list of links I¡¯d go through. The github project¡¯s readme includes a very long list of OpenAPI practice arities. https://www.baeldung.com/spring-rest-openapi-documentation https://www.baeldung.com/java-openapi-generator-server https://www.baeldung.com/java-dto-pattern https://openapi.tools/ https://openapi-generator.tech https://medium.com/swlh/openapi-swagger-ui-codegen-with-spring-boot-1afb1c0a570e https://github.com/OpenAPITools/openapi-generator An pathway to getting start