Surnet / swagger-jsdoc

Generates swagger/openapi specification based on jsDoc comments and YAML files.
MIT License
1.66k stars 224 forks source link

Wrong "Supported Specifications" list in the README #354

Closed aderchox closed 1 year ago

aderchox commented 1 year ago

Describe the bug The README says openapi 3.x is supported, however, using 3.1.0 leads to "Unable to render this definition" error, and changing it to 3.0.0 makes it work. The error was quite confusing because I didn't think this could be a swagger-jsdoc issue according to what's written in the README.

To Reproduce Steps to reproduce the behavior: This is a sample definition that doesn't work with openapi 3.1.0:

/**
 * @swagger
 * components:
 *   schemas:
 *     Todo:
 *       type: object
 *       required:
 *         - id
 *         - text
 *         - isDone
 *       properties:
 *         id:
 *           type: string
 *         text:
 *           type: string
 *         isDone:
 *           type: boolean
 *         isDeleted:
 *           type: boolean
 *         medias:
 *           type: array
 *           items:
 *             $ref: '#/components/schemas/TodoMedia'
# Rest omitted for bravity

but works with 3.0.0.

Expected behavior Since the README says 3.x is supported, I expected this to work with 3.1.0 too.

Desktop (please complete the following information):

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.