Skip to content

[Medium] SDK Sync: Add Opal Token retrieve/deactivate + report types#74

Open
mack-ship-it wants to merge 2 commits into
masterfrom
mack/sdk-sync-python-medium
Open

[Medium] SDK Sync: Add Opal Token retrieve/deactivate + report types#74
mack-ship-it wants to merge 2 commits into
masterfrom
mack/sdk-sync-python-medium

Conversation

@mack-ship-it

Copy link
Copy Markdown

Medium — Missing Operations

  • Opal Token: Add and methods (only had )
  • Reports: Add and types

Part of the SDK sync split.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +106 to +110
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@mack-ship-it mack-ship-it force-pushed the mack/sdk-sync-python-medium branch from 9f73c30 to 8ef0c7d Compare June 26, 2026 18:21
@mack-ship-it

Copy link
Copy Markdown
Author

Codex Review Assessment

Comment 1 (P2) - Opal Token retrieve/deactivate using _get_with_id/_delete with path parameter:
Valid concern. The OpenAPI spec shows retrieveOpalToken and deactivateOpalToken operate on GET/DELETE /opal/token (no path parameter) with OpalToken bearer auth, not GET/DELETE /opal/token/{id} with secret key auth. However, the Node SDK implementation uses the exact same pattern (passing an ID to _getWithId/_delete). Both SDKs are consistent. This may need to be addressed in both SDKs together, or the spec may be incomplete. Flagging for Geoffrey to confirm the correct behavior.

@mack-ship-it mack-ship-it reopened this Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant