swagger-api / swagger-api/swagger-ui

OpenAPI 3.1.0 support: inconsistent dereferencing when editing in SwaggerEditor@5

Open
#8,687 0 comments 0 reactions 1 assignee View on GitHub

@char0n is already working on this.

Since May 19, 2023.

type: bug version: 5.x
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Steps to Reproduce
If editing the spec, e.g. removing the "d" from value of description on line 12, ref gets rendered as a ref string, and not anymore as the resolved ref.

openapi: 3.1.0
info:
  title: Swagger Petstore - OpenAPI 3.1
  version: '1.0'
components:
  schemas:
    Order:
      type: object
      properties:
        user:
          $ref: '#/components/schemas/User'
          description: child
          maxProperties: 2
    User:
      type: object
      description: parent
      maxProperties: 3
      properties:
        id:
          type: integer
          format: int64
          example: 10
        username:
          type: string
          example: theUser

Actual
image (18) (1)

Expected
image (17) (2)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.