[Medium] SDK Sync: Add Opal Token retrieve/deactivate + report types#74
[Medium] SDK Sync: Add Opal Token retrieve/deactivate + report types#74mack-ship-it wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f73c306dc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| def retrieve(self, _id: str) -> MethodResponse[OpalToken]: | ||
| return super(OpalTokenResource, self)._get_with_id(_id) | ||
|
|
||
| def deactivate(self, _id: str) -> MethodResponse[OpalToken]: | ||
| return super(OpalTokenResource, self)._delete(_id) |
There was a problem hiding this comment.
Use the authenticated Opal token route
The Method OpenAPI spec defines retrieveOpalToken and deactivateOpalToken on GET/DELETE /opal/token with OpalToken bearer auth and no path parameter (see latest/openapi.bundled.json in https://github.com/MethodFi/openapi); passing _id to _get_with_id/_delete makes the SDK call /opal/token/{id} using the parent client's secret-key Authorization, so these newly exposed methods return 404/401 instead of retrieving or deactivating the authenticated Opal token.
Useful? React with 👍 / 👎.
9f73c30 to
8ef0c7d
Compare
Codex Review AssessmentComment 1 (P2) - Opal Token retrieve/deactivate using _get_with_id/_delete with path parameter: |
Medium — Missing Operations
Part of the SDK sync split.