Open russorat opened 4 years ago
The user impact isn't significant - we probably shouldn't have any circular references, but it's allowed by the spec and looks like this is an issue that has existed for over a year in our swagger.
So, it's worth looking into and fixing this, but not top priority.
There are multiple places where we have circular references. For example, the Field
object is recursive:
Field:
type: object
properties:
value:
description: >-
value is the value of the field. Meaning of the value is implied by
the `type` key
type: string
type:
description: >-
`type` describes the field type. `func` is a function. `field` is a field reference.
type: string
enum:
- func
- field
- integer
- number
- regex
- wildcard
alias:
description: >-
Alias overrides the field name in the returned response. Applies only
if type is `func`
type: string
args:
description: Args are the arguments to the function
type: array
items:
$ref: '#/components/schemas/Field'
The one raised by that tool looks like it may be from HealthCheck
:
HealthCheck:
type: object
required:
- name
- status
properties:
name:
type: string
message:
type: string
checks:
type: array
items:
$ref: "#/components/schemas/HealthCheck"
status:
type: string
enum:
- pass
- fail
have you found a solution?
Ran our swagger through this and saw the following error message:
https://apitools.dev/swagger-parser/online/?url=https%3A%2F%2Fraw.githubusercontent.com%2Finfluxdata%2Finfluxdb%2Fmaster%2Fhttp%2Fswagger.yml