可以自动调整文档而不是手动输入吗?有谁知道一些工具?还是图书馆? 。根据下面的示例,而不是手动输入那些可以根据模型自动生成它的工具? ,环回可以做到吗?还是有人知道一些工具? 。并且真正的环回支持swagger docs生成。谢谢。
swagger: '2.0'
info:
version: 1.0.0
title: customcat
basePath: /api
host: 127.0.0.1:3333
consumes:
- application/json
- application/x-www-form-urlencoded
- application/xml
- text/xml
produces:
- application/json
- application/xml
- text/xml
- application/javascript
- text/javascript
paths:
/notes:
post:
tags:
- note
summary: Create a new instance of the model and persist it into the data source.
operationId: note.create
parameters:
- name: data
in: body
description: Model instance data
required: false
schema:
$ref: '#/definitions/note'
responses:
'200':
description: Request was successful
schema:
$ref: '#/definitions/note'
deprecated: false
put:
tags:
- note
summary: >-
Update an existing model instance or insert a new one into the data
source.
operationId: note.upsert
parameters:
- name: data
in: body
description: Model instance data
required: false
schema:
$ref: '#/definitions/note'
responses:
'200':
description: Request was successful
schema:
$ref: '#/definitions/note'
deprecated: false
get:
tags:
- note
summary: Find all instances of the model matched by filter from the data source.
operationId: note.find
parameters:
- name: filter
in: query
description: 'Filter defining fields, where, include, order, offset, and limit'
required: false
type: string
format: JSON
responses:
'200':
description: Request was successful
schema:
type: array
items:
$ref: '#/definitions/note'
deprecated: false