Id is not required
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- openapi
- Domain
- api
Research direction
Compare the documented schemas for collections using auto-incremented integer or big-integer primary keys with the Generated UUID example in the issue. Trace where the OpenAPI schema marks properties as required, and consider the work done when integer-based collection schemas include id in their required list without changing unrelated properties.
Written by the indexing model from the issue text.
Description
Collections with Primary Key Field set to Auto-incremented integer or Auto-incremented big integer doesn't have the id property set to required as oppose to collections where the id type is set to Generated UUID.
This issue causes clients such as Orval to generate types with optional id.
"ItemsUUID": {
"type": "object",
"properties": {
"id": {
"nullable": false,
"type": "string",
"format": "uuid"
},
"name": {
"nullable": true,
"type": "string"
}
},
"x-collection": "uuid",
"required": [
"id"
]
},
"ItemsInteger": {
"type": "object",
"properties": {
"id": {
"nullable": false,
"type": "integer"
},
"name": {
"nullable": true,
"type": "string"
}
},
"x-collection": "integer"
}
}
- Dominant language
- TypeScript
- Stars
- 9
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
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 directus/openapi
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Collection endpoints need more examplesMay be free again @hola-soy-milk claimed this 545 days ago, and no pull request is open. Open
-
Collection endpoints have incorrect schemaMay be free again @hola-soy-milk claimed this 545 days ago, and no pull request is open. Open
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
All issues in directus/openapi
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openedx/frontend-app-authoring#3274 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
area/documentation status/need-triage
Difficulty 1/5 Under an hour Newbie friendliness 95/100
google-gemini/gemini-cli#29548 ·
Maintainers usually reply within 1 day
-
sdk-typescript vector-store
Difficulty 2/5 Half a day Newbie friendliness 82/100
mem0ai/mem0#7495 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day