Skip to content

Cannot use reference to component referenced from external file. #54

Closed
@liquorvicar

Description

@liquorvicar

If I have defined a component externally, like this:

components:
  schemas:
    Pet:
      $ref: definitions.yaml#/Pet

Then I expect to be able to use it like this:

paths:
  '/pet':
    get:
      responses:
        200:
          description: return a pet
          content:
            'application/json':
              schema:
                $ref: "#/components/schemas/Pet"

However, when I do so, I get an error: cebe\openapi\exceptions\UnresolvableReferenceException : Cyclic reference detected, setReferenceContext() called on a Reference Object.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds investigationWork is needed to figure out the root cause of the problem.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions