Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwaggerEditor@next: support for local reference indirections #3626

Closed
char0n opened this issue Nov 8, 2022 · 0 comments · Fixed by swagger-api/apidom#2959
Closed

SwaggerEditor@next: support for local reference indirections #3626

char0n opened this issue Nov 8, 2022 · 0 comments · Fixed by swagger-api/apidom#2959

Comments

@char0n
Copy link
Member

char0n commented Nov 8, 2022

Q&A (please complete the following information)

  • OS: Linux Mint
  • Browser: Chrome
  • Version: 107.0.5304.87 (Official Build) (64-bit)
  • Method of installation: https://editor-next.swagger.io/
  • Swagger-Editor version:
    image

Content & configuration

Example Swagger/OpenAPI definition:

openapi: 3.1.0
info:
  title: deref
  version: 1.0.0
servers:
  - description: local
    url: http://localhost:8082/
paths:
  /a:
    get:
      operationId: aget
      parameters:
        - $ref: '#/components/parameters/userId'
    post:
      operationId: apost
  /b:
    get:
      operationId: bget
      parameters:
        - $ref: '#/components/parameters/userId'
    post:
      operationId: bpost
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/foo'
components:
  schemas:
    foo:
      type: string
    bar:
      $id: http://localhost:8082/
      type: string
  parameters:
    userId:
      $ref: '#/components/parameters/indirection1'
      description: override
    indirection1:
      $ref: '#/components/parameters/indirection2'
      summary: indirect summary
    indirection2:
      $ref: '#/components/parameters/userIdRef'
      summary: indirect summary
    userIdRef:
      name: userId
      in: query
      description: ID of the user
      required: true
    externalRef:
      $ref: ./ex.json#/externalParameter
      description: another ref

Describe the bug you're encountering

Following lint errors are triggered:

image

Expected behavior

No errors displayed

Screenshots

image

Additional context or thoughts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants