cancel
Showing results for 
Search instead for 
Did you mean: 

Response object property named "entries" causes editor.swagger.io to error.

SOLVED
Highlighted
Visitor

Response object property named "entries" causes editor.swagger.io to error.

editor.swagger.io fails to render if the spec file contains a response with an object property named "entries".

This spec DOES NOT render:

openapi: 3.0.0
  info:
    title: test
    version: 1.0.0
  paths:
    '/test':
      get:
        summary: test
        responses:
          '200':
            description: test
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    entries:
                      type: string

 

The editor shows this error message:

Unable to render this definition

The provided definition does not specify a valid version field.

Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0).

 

This spec DOES render. The only difference is the name of the property was changed from "entries" to "entries1":

openapi: 3.0.0
  info:
    title: test
    version: 1.0.0
  paths:
    '/test':
      get:
        summary: test
        responses:
          '200':
            description: test
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    entries1:
                      type: string

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: Response object property named "entries" causes editor.swagger.io to error.

Hi @k1derly, thanks for the report. It's a bug in the latest release of Swagger Editor, the issue is tracked here:

https://github.com/swagger-api/swagger-ui/issues/6016

 

As a workaround, please use Swagger Editor version 3.8.2, you can download it from the Releases page. To run the editor locally, open the index.html file in your browser, or put index.html and the dist folder on a web server and load it from there.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

1 REPLY 1
Highlighted
Moderator

Re: Response object property named "entries" causes editor.swagger.io to error.

Hi @k1derly, thanks for the report. It's a bug in the latest release of Swagger Editor, the issue is tracked here:

https://github.com/swagger-api/swagger-ui/issues/6016

 

As a workaround, please use Swagger Editor version 3.8.2, you can download it from the Releases page. To run the editor locally, open the index.html file in your browser, or put index.html and the dist folder on a web server and load it from there.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Top Kudoed Authors
Top Kudoed Posts