Skip to content

Validating schema fails on recursion openapi 3.0.3Β #124

@leonpros

Description

@leonpros

Expected Behavior

Validation of yaml/json file should be ok.

Minimal Example Spec

Example of yaml that fails to validate:

File:
type: object
properties:
absoluteFile:
$ref: '#/components/schemas/File'
absolutePath:
type: string
canonicalFile:
$ref: '#/components/schemas/File'
file:
type: boolean

Actual Behavior

prance validate .\Tests_API\openapi.yaml

ERROR in ".\Tests_API\openapi.yaml" [ResolutionError]: Recursion reached limit of 1 trying to resolve "file:///C:/Tests_API/openapi.json#/components/schemas/File"!
file:///C:/Tests_API/openapi.json#/components/schemas/File
file:///C:/Tests_API/openapi.json#/components/schemas/File

Steps to Reproduce

Environment

  • OS: Win 10
  • Python version: 3.8.5
  • Swagger/OpenAPI version used: 3.0.3
  • Backend: (flex, swagger-spec-validator or openapi-spec-validator)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions