-
swagger-petstore
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
When you run your web api app, you can access the swagger.json at http://localhost:/swagger/v1/swagger.json. Now either you can pass the link to swagger.json or make it accessible from file system. If you go the former route then you need to ensure your web api is up somewhere and updated or spin it up locally. I went ahead with downloading the file into file system using Swashbuckle.AspNetCore.Cli which can generate swagger.json from your web api assembly.
I only found NSwag or swagger-codegen for this and went ahead with the latter because it has more options and configurability. A great feature of this tool is that you can control the generated code through the use of mustache templates documented here. If you want to kickstart your template customization for your preferred language then look here. Now, you can simple execute a command as simple as swagger-codegen generate -i ./swagger.json -l ruby -o /tmp/test/.
Related posts
-
Integrating Swagger/OpenAPI generated python server with existing Flask application
-
How to replace type methods in Swift to improve testability
-
Where are the documentation for server stub generation with swagger codegen?
-
Where are the documentation for server stub generation with swagger codegen?
-
Does Swagger Codegen work for PHP sdk ?