我在使用swagger.js路由时遇到了一些swagger配置问题。我正在使用 * swagger-jsdoc '**和 * swagger-ui-express'**在代码中创建文档,并通过'/docs'路由访问它
这段代码位于我的路由底部:
/**
* @swagger
* /table/join:
* post:
* summary: Join table
* requestBody:
* description: Table and user uuids
* required: true
* content:
* application/json:
* schema:
* type: object
* properties:
* user_id:
* type: string
* table_uuid:
* type: string
* tags:
* - Table
* responses:
* "200":
* description: Your table created successfully.
* content:
* application/json:
* schema:
* type: object
* properties:
* resultMessage:
* $ref: '#/components/schemas/ResultMessage'
* resultCode:
* $ref: '#/components/schemas/ResultCode'
* uuid:
* type: string
* "400":
* description: Please provide all the required fields!
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/Result'
* "500":
* description: An internal server error occurred, please try again.
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/Result'
*/
字符串
不管我怎么改变间距都不会改变。我错过什么了吗?
Error in src/api/controllers/user-table/join-table.js :
YAMLSyntaxError: All collection items must start at the same column at line 3, column 6:
summary: Join table
^^^^^^^^^^^^^^^^^^^…
型
1条答案
按热度按时间pokxtpni1#
看起来你的
400
和500
相差一个空格字符串