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

recursion hangs validator, but imho it's a valid spec #961

Closed
martinrode opened this issue Jun 5, 2024 · 1 comment · Fixed by #981
Closed

recursion hangs validator, but imho it's a valid spec #961

martinrode opened this issue Jun 5, 2024 · 1 comment · Fixed by #981

Comments

@martinrode
Copy link

Including a file "schema/config_param.yml" hangs the validator.

I was able to define a recursion in the top level comonents.schema section but not inside an included schema file.

discriminator:
  propertyName: "type"
oneOf:
  - title: "text"
    description: |
      type "text": **text** is a simple string.
    type: object
    required:
      - type
    properties:
      default:
        type: string
      position:
        type: number
        format: int32
        minimum: 0
        description: |
          Position of the parameter in the output.
      name:
        type: string
        description: "name of the parameter as used in the API"
  - title: "table"
    description: |
      type "table"
    type: object
    required:
      - type
    properties:
      default:
        type: string
      position:
        type: number
        format: int32
        minimum: 0
        description: |
          Position of the parameter in the output.
      name:
        type: string
        description: "name of the parameter as used in the API"
      fields:
        type: array
        items:
          $ref: 'config_param.yml'

Using $ref: '#' reports "unresolved ref" which is imho wrong as it should simply include the file again.

@AnatolyRugalev
Copy link
Contributor

Can you check if #970 solves the issue for you?

AnatolyRugalev added a commit to AnatolyRugalev/kin-openapi that referenced this issue Jul 10, 2024
fenollp pushed a commit that referenced this issue Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants