[docs-agent] Remove false networks default on Portfolio by-address requests - #1649
Merged
Merged
Conversation
…quests The Portfolio API request schemas AddressItem, AddressItemForNFTOwnership, and AddressItemWith20Maximum each declared an array-level default of [eth-mainnet, base-mainnet, matic-mainnet] on the networks field. Redocly rendered this as "Defaults to ["eth-mainnet","base-mainnet","matic-mainnet"]." on four endpoints (get-tokens-by-address, get-token-balances-by-address, get-nfts-by-address, get-nft-contracts-by-address), but the server has no such default and networks is a required field on every request. Removing the array-level default so the docs no longer imply a false default set. Requested-by: @brianluong
🔗 Preview Mode
|
The get-transfers-by-address page also rendered a false "Defaults to Ethereum, Base, and Polygon mainnet" hint on the networks field, sourced from an array-level default: block on TransfersByAddressRequest.networks plus a matching prose sentence in the field description. There is no server-side default; networks is a required field. Dropped both the schema default and the prose statement so the docs no longer imply a false default set. Requested-by: @brianluong
CodesMcCabe
approved these changes
Sep 24, 2026
brianluong
pushed a commit
that referenced
this pull request
Sep 25, 2026
…1653) * [docs-agent] Add networks example on Portfolio by-address requests Re-add [eth-mainnet, base-mainnet, matic-mainnet] on the four AddressItem*/TransfersByAddressRequest networks fields as schema-level example: instead of default:. Per OpenAPI semantics default: describes the actual API default (which does not exist here — networks is required) while example: is the sample value renderers and playgrounds use to pre-populate. This restores the sample-value UX that PR #1649 dropped without falsely implying a server-side default. Requested-by: @dslovinsky * [docs-agent] Add inline requestBody example on NFT by-address endpoints The three other Portfolio by-address endpoints (get-tokens-by-address, get-token-balances-by-address, get-transfers-by-address) already carry an inline requestBody example: block that pre-populates the playground with the 3-network sample. The NFT endpoints (get-nfts-by-address, get-nft-contracts-by-address) previously relied on the shared schema alone, which meant the schema-level networks example added earlier in this PR was the only source of the sample value on those two pages. Adding matching inline examples so all five endpoints have an explicit requestBody example and the playground pre-population path is consistent across the whole Portfolio surface. Requested-by: @brianluong --------- Co-authored-by: Daniel Slovinsky <slovinsky1993@gmail.com>
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.
Summary
The Portfolio
*-by-addressreference pages currently renderDefaults to ["eth-mainnet","base-mainnet","matic-mainnet"].(or the equivalent "Defaults to Ethereum, Base, and Polygon mainnet." prose) on thenetworksfield, but the API has no such default —networksis a required field on every request and there is no server-side fallback.Root cause: four request schemas in
src/openapi/portfolio/portfolio.yamldeclared an array-leveldefault:block on thenetworksproperty. Redocly renders that as the "Defaults to" hint on the reference pages. ForTransfersByAddressRequestthe same fact was also asserted as prose inside the field'sdescription:.Fix:
default:onAddressItem,AddressItemForNFTOwnership,AddressItemWith20Maximum, andTransfersByAddressRequest.networks.TransfersByAddressRequest.networks.description.Left untouched:
default: eth-mainneton each array'sitems(per-element hint, not the array default).AddressItemTransactionHistory(2-network default, out of scope — this one is used only by the BETA transaction-history endpoint and matches its documented "In BETA and only accepts ETH & BASE mainnets" description).Affected pages:
Validated with
pnpm run validate:rest— 0 errors on the portfolio spec.Requested by
@brianluong (via Slack thread)