ci: trigger CI after openapi spec updates + fix generator nullable type#94
Merged
Merged
Conversation
Two schemas in the bundled openapi spec (org-consumption-quota-request, org-consumption-quota-response) use the OpenAPI 3.1 nullable form '"type": ["integer", "null"]'. The generator treated schema['type'] as a string, blew up at module import time with 'unhashable type: list', and broke the whole SDK. Add _resolve_type() that unwraps list types to the first non-'null' member, apply it to every _type_translations lookup site. nullable: true (OpenAPI 3.0) was already handled implicitly and is unchanged. Also trigger CI on completion of 'Update bundled openapi definition' so a bad spec update pushed to master fails CI instead of going silent.
Contributor
Author
|
[SC-179745] |
kobajagi
approved these changes
Jun 25, 2026
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.
Two changes:
.github/workflows/main.ymltriggers CI on completion ofUpdate bundled openapi definition(the hourly job that pushes spec updates to master), plus an explicitmasterentry inpush.branches. A bad spec update now fails CI instead of going silent.exoscale/api/generator.pyadds_resolve_type()to handle OpenAPI 3.1 nullable schemas like"type": ["integer", "null"]. The old code assumedschema["type"]was a string and died at import withunhashable type: 'list', bricking the whole SDK. This is the breakage the CI hook above is meant to catch next time.Verified on Python 3.10 to 3.14: 16 passed on every version. Output:
Note
AI-assisted for patch draft and this very PR description.