Build: Bump datamodel-code-generator from 0.63.0 to 0.64.1#16993
Conversation
Regenerate open-api/rest-catalog-open-api.py with datamodel-code-generator 0.64.1. As of 0.64.0, optional primitive const fields no longer emit the const value as an injected default, so the generated discriminator fields (action/type) are now `Literal[...] | None = None`. Committing the regenerated output keeps `make generate` + `git diff --exit-code` green. Supersedes apache#16985. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| allOf: | ||
| - $ref: '#/components/schemas/BaseUpdate' | ||
| required: | ||
| - action |
There was a problem hiding this comment.
Why do we need to change this file? Did CI fail without this change?
There was a problem hiding this comment.
In my understanding, BaseUpdate already declared required: action so action was always required by the parent schema. The subschemas (AssignUUIDUpdate etc.) just forgot to re-declare it in their own required: list, even though allOf: [$ref: BaseUpdate] already implies it.
There was a problem hiding this comment.
Yes, exactly. action was always required via BaseUpdate, so this isn't an API change. The generator reads each subschema's own required list (not the inherited allOf), and 0.64.1 stopped auto-filling fixed values, so the re-declared action now generates as nullable. Adding it to required keeps it non-nullable. CI doesn't actually fail without it.
) * Build: Bump datamodel-code-generator from 0.63.0 to 0.64.1 Regenerate open-api/rest-catalog-open-api.py with datamodel-code-generator 0.64.1. As of 0.64.0, optional primitive const fields no longer emit the const value as an injected default, so the generated discriminator fields (action/type) are now `Literal[...] | None = None`. Committing the regenerated output keeps `make generate` + `git diff --exit-code` green. Supersedes apache#16985. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Mark REST spec discriminators as required so they are not generated as nullable --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Regenerate open-api/rest-catalog-open-api.py with datamodel-code-generator 0.64.1. As of 0.64.0, optional primitive const fields no longer emit the const value as an injected default, so the generated discriminator fields (action/type) are now
Literal[...] | None = None. Committing the regenerated output keepsmake generate+git diff --exit-codegreen.Supersedes #16985.