Skip to content

SwaggerUI crashing with incorrectly placed $ref #5188

@plavski

Description

@plavski

Q&A (please complete the following information)

  • OS: macOS
  • Browser: opera (chrome)
  • Version: 58
  • Method of installation: editor.swagger.io
  • Swagger-UI version: editor.swagger.io
  • Swagger/OpenAPI version: OpenAPI 3.0.0

Content & configuration

Example Swagger/OpenAPI definition:

openapi: 3.0.0
servers: []
info:
  description: sdf
  version: "1.0.0"
  title: Swagger Petstore
paths:
  /pet:
    get:
      tags:
        - pet
      summary: 
        $ref: 
      operationId: addPet
      responses:
        '405':
          description: Invalid input

Describe the bug you're encountering

With a $ref placed under a summary tag in an oas3 definition, swagger-ui crashes rendering. Resolving the issue by removing the tag and filling out the summary correctly does not allow validation to continue working.

To reproduce...

Steps to reproduce the behavior:

  1. Go to editor.swagger.io
  2. Paste yaml

Expected behavior

Rendered to continue to work and not crash allowing validation to reassert itself.

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