Conversation
… whole response, so response enums now accept unknown values Response enums marked `x-extensible-enum: true` in docs/openapi.yaml get a `_missing_` hook (src/zenrows/batch/_open_enum.py) added after codegen by scripts/open_extensible_enums.py: an unknown value parses as an UNKNOWN member that keeps the raw value. Request-side enums (JobType, ScheduleState, ...) stay strict so a typo still fails locally. PyYAML becomes an explicit dev dependency for the post-step, and CI now fails if the generated models drift from the spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Generated response enums were strict, so one value the server adds later (a new status or failure reason) made pydantic reject the whole response. Every released SDK version would break the day the API grows an enum.
What
_missing_hook (_open_enum.py) is added by a post-generation step (scripts/open_extensible_enums.py) to enums markedx-extensible-enum: trueindocs/openapi.yaml.type="regulr"still fail locally.No version bump.
Verification
make test: 166 passed. ruff, format and ty are clean. The drift check passes locally.models.pyto main makes 12 tests fail with pydantic enum errors.🤖 Generated with Claude Code