- local API Mock based on YAML document, support dynamically generate data
- Automatically generate and export API document.
- Automatically compare request and response data by document, and show differences
- Generate corresponding error statistics
- HTTP/HTTPS/HTTP2/GRPC Proxy
The problem we encountered
Usually after the requirements are determined, we will first write an interface document to the front end, and then the front end will be developed according to the interface defined by the document.
During this time we may encounter many problems:
- Structured loose or unstructured document format, difficult to manage, collaborate, and troublesome to write
- Only documents, users themselves mocking various data is very troublesome, sometimes it will be developed after the real interface is ready.
- The request parameter format is not in accordance with the document. It works normally under the example, and there may be problems on the production environment.
- The backend interface is not in the document format, and the front end may not be processed in certain situations.
- The interface has been changed, but the document has not been changed. Over time, the document is ineffective.
- Write structured documents using YAML, and the data structures can be reused. An interface can even be as simple as a few lines
- After the document is completed, you are equivalent to having a local backend server. All interfaces in the document can be called directly.
- When sending a request defined in the document, we will check by the documentation whether the request parameters are consistent with the document definition. If there is a mismatch, there will be a corresponding prompt
- When connecting to a real server, we will help you check if the return format of the data is consistent with the document definition. If there is a mismatch, there will be a corresponding prompt
- The above method allows the document to actively participate in the development, and will urge the user to update the document.
Here you can quickly learn how to define interface documentation.
An interface can be as simple as a few lines
project: host: xjz.pw apis: - title: Get a user information method: GET path: /api/v1/users/\d+ response: success: data: id: 1 name: User 1
Document Specification and Examples