[Schema Inaccuracy] Repository Advisory's author and publisher fields
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- openapi
- Domain
- api
Research direction
Start by locating the #/components/schemas/repository-advisory schema in the OpenAPI description and inspect the author and publisher fields. Check how their allOf and nullable type declarations are interpreted by the project’s schema conventions and relevant OpenAPI tooling. Done means both fields have an unambiguous, valid representation that supports the reported client-generation use case.
Written by the indexing model from the issue text.
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.
- Dominant language
- No language data
- Stars
- 1.6k
- Forks
- 342
- Avg merge
- 2h 23m
- Merged PRs (30d)
- 57
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/rest-api-description
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
github/rest-api-description#7220 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
github/rest-api-description#7201 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/rest-api-description#7163 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7162 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7135 ·
All issues in github/rest-api-description
Similar issues
-
Area: Excel support
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
orbeon/orbeon-forms#7893 ·
-
essnmx good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
yeti-platform/yeti#1380 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelcontextprotocol/python-sdk#3566 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
griptape-ai/griptape#2353 ·