Many questions being asked about generate Rest API to html documents.
But eggs comes from chicken.
In many cases , the architecture needs to define the API . It's a connection between web developers and iOS/Android client developers.
So is there such kind of tool or web , we can do follow things:
New a API write the subURL write the POST/GET method write the post parameters write the returned answers write the sample request , any kinds of condition, error codes. After all this, there is a doc or Online doc html there.
We can edit , update it after times pass by. The web/client developer , just need to watch the document ,then they are ready to go.
Is there any kind of tool can archive this ? Thank you.
Swagger is a tool implementing the Open API specification which defines a standard, language-agnostic interface for describing HTTP-based APIs. Swagger is used for documenting REST APIs.
Automate your API Documentation Workflow To promote this workflow, we created Stoplight Docs. Optimized for speed, Stoplight Docs allows you to auto-generate API documentation within minutes. Upload your OpenAPI Specification (formerly known as Swagger) and instantly publish it to the web.
There are a couple of specs for documents that allow clients to discover RESTful APIs.
Swagger (demo)
apiary
JSON Home
Google use their own Discovery Service, however unlike the others, unfortunately I don't think there are open sourced libraries that help you use expose it from your own APIs.
I have used swagger and it works well. The spec handles the things you have mentioned:
JSON Schema to describe request/responses
A list of error codes/conditions
A codegen library to generate client side code for a number of languages such as Javascript, Java, Objective-C, Scala, PHP, Python, Ruby, and more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With