feat: use object-style params for Solana DAS endpoints#1029
feat: use object-style params for Solana DAS endpoints#1029dslovinsky wants to merge 2 commits intomainfrom
Conversation
Add `paramStructure: by-name` to all 12 DAS methods so the rendered
docs produce `params: { ... }` instead of `params: [...]`.
- Add missing primary fields (id, ids, ownerAddress, mint, etc.) and
`required` arrays to config schemas in asset.yaml
- Create GetAssetProofParams / GetAssetProofsParams schemas
- Collapse multi-param methods into a single config param
- Update examples to use full object values
Co-Authored-By: Claude <noreply@anthropic.com>
🌿 Documentation Preview
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 769afcf324
ℹ️ 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".
| description: The ID of the asset to retrieve. | ||
| schema: | ||
| $ref: ../../chains/_components/solana/asset.yaml#/components/schemas/AssetId | ||
| - name: Configuration |
There was a problem hiding this comment.
Rename by-name params to actual RPC field names
With paramStructure: by-name, each params[].name is treated as the JSON key on the wire. Using labels like Configuration here (and similarly Search filters elsewhere in this file) causes generated/request examples to become params: {"Configuration": {...}} instead of DAS’s expected top-level fields such as id, ids, ownerAddress, etc., so consumers that follow this spec will send invalid payloads.
Useful? React with 👍 / 👎.
With `paramStructure: by-name`, each param's `name` becomes a top-level
JSON key on the wire. Using `name: Configuration` produced
`"params": {"Configuration": {...}}` instead of the expected flat params.
Expand each method's single Configuration param into individual named
params where each name matches the actual DAS API field name.
Co-Authored-By: Claude <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 24c72b6ecf
ℹ️ 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".
| - name: mint | ||
| required: false | ||
| description: Configuration object for filtering and pagination. | ||
| description: The mint address to filter token accounts by. | ||
| schema: | ||
| $ref: ../../chains/_components/solana/account.yaml#/components/schemas/GetTokenAccountsConfig | ||
| $ref: ../../chains/_components/solana/base-types.yaml#/components/schemas/Pubkey |
There was a problem hiding this comment.
Preserve full getTokenAccounts parameter surface
This expansion drops valid request options from getTokenAccounts: the method now exposes only mint, owner, programId, limit, and cursor, but GetTokenAccountsConfig still includes commitment, minContextSlot, dataSlice, and encoding in src/openrpc/chains/_components/solana/account.yaml (lines 237-245). As a result, generated docs/types from this method no longer allow those options even though they were previously available through the config object, which is a behavioral regression for callers that need non-default commitment or encoding.
Useful? React with 👍 / 👎.
Summary
paramStructure: by-nameto all 12 Solana DAS methods so the docs site renders"params": { ... }instead of"params": [...]id,ids,ownerAddress,mint, etc.) andrequiredarrays to config schemas inasset.yamlGetAssetProofParamsandGetAssetProofsParamsschemas for methods that previously had no config objectCompanion PR: OMGWINNING/docs-site (rendering support for
paramStructure: by-name)Test plan
pnpm generate:rpc— confirmparamStructure: "by-name"appears in generatedsolana-das.jsonfor all 12 methodsownerAddressinGetAssetsByOwnerConfig)