Skip to content

UI hangs when there are top level produces and request header reference #4467

@jemerald

Description

@jemerald
Q A
Bug or feature request? Bug
Which Swagger/OpenAPI version? 2.0
Which Swagger-UI version? 3.13.5 (does not happen on previous versions)
How did you install Swagger-UI? swagger-ui-dist, or use online editor (editor.swagger.io)
Which browser & version? Chrome@latest
Which operating system? Windows 8

Demonstration API definition

I've narrowed it down to the following minimum spec:

swagger: '2.0'
info:
  version: v1
  title: Foo
basePath: /v1/foo
produces:
- application/json
parameters:
  testHeader:
    name: test-header
    description: some request header
    type: string
    in: header
    required: false
paths:
  '/':
    parameters:
    - $ref: '#/parameters/testHeader'
    get:
      responses:
        200:
          description: Successful response
          schema:
            type: object
            properties:
              bar:
                type: string

Problem doesn't happen if either the produces or the header parameter is moved into the get method.

Configuration (browser query string, constructor, config.yaml)

No specific config

Expected Behavior

Spec to be rendered and UI working

Current Behavior

Entire UI freezes when expanding the path on the swagger UI

Possible Solution

Context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions