Skip to content

New problem with 'entries' in property name #6033

Closed

Description

@aloysiustany

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome
  • Version: 81
  • Method of installation: editor.swagger.com
  • Swagger-UI version: I think editor.swagger.com is using the latest i.e. 3.25.4
  • Swagger/OpenAPI version: Swagger 2.0

Content & configuration

This looks like another new problem when having 'entries' as property name. Other properties in the same level of 'entries' properties, fails to load with error "Could not render this component, see the console"

Example Swagger/OpenAPI definition:

  swagger: '2.0'
  info:
    title: Test Me
    version: '1'
  paths:
    '/test/me':
      get:
        summary: Test api
        operationId: getTestMe
        produces:
          - '*/*'
        responses:
          '200':
            description: OK
            schema:
              $ref: '#/definitions/TestMeDto'
          '500':
            description: Internal Server Error
        deprecated: false
  definitions:
    TestMeDto:
      type: object
      properties:
        name: 
          type: string
        age: 
          type: string
        entries: 
          type: array
          items:
            $ref: '#/definitions/TestMeEntries'
    TestMeEntries:
      type: object
      properties:
        date: 
          type: string
        time: 
          type: string

Describe the bug you're encountering

To reproduce...

Try to load swagger ui and use yaml above

Screenshots

image

if I change entries to entries-new, it works as expected:
image

Activity

  1. shindigira commented on May 26, 2020

    @shindigira

    I am confirming this issue where any property named entries causes an error. In my case where I am utilizing hapi-swagger which in turn relies on swagger-ui, I get the error below.

    Screen Shot 2020-05-26 at 4 17 58 PM

    Note: I am not missing a valid version field despite the presented error message. This goes away when I rename "entries" to any other field name.

  2. tim-lai commented on May 27, 2020

    @tim-lai
    Contributor

    @aloysiustany @shindigira this will be fixed in the next release, via bec6aeb

  3. added this to the M2 milestone on Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions