3 ms·
If you've a Swagger/OpenAPI spec, you can use Swagger Codegen (https://github.com/swagger-api/swagger-codegen https://github.com/swagger-api/swagger-codegen) to
by wing328hk 11y ago
If you've a Swagger/OpenAPI spec, you can use Swagger Codegen (https://github.com/swagger-api/swagger-codegen https://github.com/swagger-api/swagger-codegen) to generate API clients (SDKs) in C#, Ruby, PHP, Java, ObjC, etc. Here is an example: https://github.com/wing328/petstore-php https://github.com/wing328/petstore-php
A good starting point is to generate the SDK online: https://github.com/swagger-api/swagger-codegen#online-generators https://github.com/swagger-api/swagger-codegen#online-genera...
Swagger-Codegen can also generate server stub in SpringMVC, PHP Slim and more.
Disclosure: I'm a top contributor to the project.
- 7373737373 11y agoDo you know any projects that reverse this functionality (generating API documentation from code)? I know that https://github.com/timothycrosley/hug https://github.com/timothycrosley/hug intends to provide this in the future, but could not find one for other languages (Javascript would be useful right now).