我多次更改 $ref 值,
但所有这些都显示相同的错误...请帮助我,请问出了
什么问题?
swagger.js
import swaggereJsdoc from 'swagger-jsdoc';
const options = {
swaggerDefinition: {
info: {
title: 'User API',
version: '1.0.0',
description: 'User API with express',
},
host: 'localhost:8000',
// basePath: '/api',
},
apis: ['./routers/*.js', './swagger/*'],
};
export const specs = swaggereJsdoc(options);
Run Code Online (Sandbox Code Playgroud)
用户路由器.js
/**
* @swagger
* /api/users:
* get:
* tags:
* - user
* description: users (array)
* produces:
* - application/json
* responses:
* '200':
* description: success getUsers
*
* schema: …Run Code Online (Sandbox Code Playgroud)