Open
Description
Schema Inaccuracy
Currently, the #/components/schemas/repository-advisory
schema has two fields with interesting types:
author:
readOnly: true
description: The author of the advisory.
allOf:
- "$ref": "#/components/schemas/simple-user"
type:
- 'null'
publisher:
readOnly: true
description: The publisher of the advisory.
allOf:
- "$ref": "#/components/schemas/simple-user"
type:
- 'null'
This appears to be somewhat contradictory, though it's always possible I'm misunderstanding the intent and the spec. The impact is that I'm currently unable to generate client code using a custom code generator (which, of course, might be wrong).
Expected
I believe the contents of the allOf
property should be part of type
, creating a nullable union:
author:
readOnly: true
description: The author of the advisory.
type:
- "$ref": "#/components/schemas/simple-user"
- 'null'
publisher:
readOnly: true
description: The publisher of the advisory.
type:
- "$ref": "#/components/schemas/simple-user"
- 'null'
Reproduction Steps
This issue arose while generating code from the description, so no API endpoint calls are involved. The code generator is language-specific, so it's unlikely to be useful during reproduction.