Skip to content

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

@martinrode

Description

@martinrode

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions