swagger-api / swagger-api/swagger-parser

Circular references to parameters, responses etc

Open
#1,397 3 comments 0 reactions 1 assignee View on GitHub

@frantuma is already working on this.

Since Jun 7, 2023.

Dominant language
Java
Stars
867
Forks
560
Avg merge
2d 21h
Merged PRs (30d)
7

Description

openapi v3 parser should throw error when there are circular references to parameters, responses, request body etc, except for schemas.

openapi: 3.0.1
info:
  title: Swagger Petstore
  description: 'This is a sample server Petstore server'
  version: 1.0.0
servers:
  - url: http://mytestServer/{v1}
    variables:
      v2:
        default: 'd'
paths:
  '/pet/{petId}':
    get:
      parameters:
        - $ref: '#/components/parameters/P1'
      responses:
        '200':
          $ref: '#/components/responses/R1'
components:
  responses:
    R1:
      $ref: '#/components/responses/R1'
  parameters:
    P1:
      $ref:  "#/components/parameters/P1"

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.