Chore/unpin openapi spec validator and update target python versions#103
Open
v-v-v-v-v-v-v-v wants to merge 5 commits intomasterfrom
Open
Conversation
…ate-target-python-versions
1c77fc2 to
8b45b3a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #103 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 515 514 -1
=========================================
- Hits 515 514 -1
🚀 New features to boost your workflow:
|
Levence
reviewed
Apr 30, 2026
| uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # 5.1.0 | ||
| with: | ||
| python-version: '3.9' | ||
| python-version: ${{ matrix.python-version }} |
| @@ -1 +1 @@ | |||
| __version__ = "1.3.1" | |||
| __version__ = "1.3.2" | |||
Contributor
Author
There was a problem hiding this comment.
You can clearly see when things started out as "bump a few dependencies" into something much more involved. 😛 Will bump the version proper.
| method = path[method_type] | ||
|
|
||
| operation = method.get("operationId", "").split(".") | ||
| operation = method.get("x-stax-sdk-operation-id", "").split(".") |
Contributor
There was a problem hiding this comment.
looks pretty straightforward
| @classmethod | ||
| def schema_url(cls): | ||
| return f"https://{cls.hostname}/{cls.API_VERSION}/public/api-document" | ||
| return f"https://{cls.hostname}/{cls.API_VERSION}/public/oas3-document" |
Contributor
There was a problem hiding this comment.
I think it would be good to have some tests to validate the current calls are still valid. The sdk knows about these, for example:
>>> accounts.ffff()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/levence/.pyenv/versions/3.9.20/lib/python3.9/site-packages/staxapp/openapi.py", line 100, in stax_wrapper
raise ValidationException(
staxapp.exceptions.ValidationException: No such operation: ffff for accounts. Please use one of ['UpdateAccountTypeMembers', 'ReadAccounts', 'CreateAccount', 'CloseAccount', 'DiscoverAccounts', 'OnboardAccount', 'ReadAccountTypes', 'CreateAccountType', 'UpdateAccountTypeAccess', 'DeleteAccountType', 'UpdateAccountType', 'UpdateAccount', 'ReadAccountPolicyAttachments']
accounts.UpdateAccount(x=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/levence/.pyenv/versions/3.9.20/lib/python3.9/site-packages/staxapp/openapi.py", line 122, in stax_wrapper
raise ValidationException(
staxapp.exceptions.ValidationException: Missing one or more parameters: ['account_id']
There is probably a smart way to retrieve these on the old schema and assert in the new schema yeah?
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.
Also updates classifiers and other targets to indicate that the Stax SDK supports at minimum Python 3.9; I believe this has been somewhat indicated with build jobs targetting 3.9, but this is explicit now.
openapi_spec_validatorwill result in the following:pkg_resourcesis deprecated and removed from newer versions of setuptools.