Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there tools to define Rest API in document ? [closed]

Tags:

rest

web

api

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.

like image 681
Jacob Avatar asked Sep 06 '13 08:09

Jacob


People also ask

Which tool is used for API documentation?

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.

How do I automate API documentation?

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.


1 Answers

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.

like image 51
theon Avatar answered Nov 16 '22 01:11

theon