Hacker News new | past | comments | ask | show | jobs | submit login

If you've a Swagger/OpenAPI spec, you can use 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

A good starting point is to generate the SDK online: 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.




Do you know any projects that reverse this functionality (generating API documentation from code)? I know that 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).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: