OpenAPI自动生成代码

前后分离后接口实现先定义采用yaml的方式。

 

核心关键字:OpenAPI、swagger

 

swagger yaml 规范3.0

https://swagger.io/docs/specification/basic-structure/

swagger yaml 规范2.0

https://swagger.io/docs/specification/2-0/basic-structure/

swagger-api

https://github.com/swagger-api/swagger-codegen

生成代码基于swagger2.0的代码官方例子

https://github.com/OpenAPITools/openapi-generator/tree/master/samples/server/petstore/springboot/src/main

一个能运行的例子

https://github.com/thomasJoei/swagger-codegen-springboot

swagger-codegen-maven-pluging官方

https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin

你可能感兴趣的:(OpenAPI自动生成代码)