Skip to content

[docs-agent] Remove false networks default on Portfolio by-address requests - #1649

Merged
brianluong merged 2 commits into
mainfrom
docs/portfolio-remove-false-networks-default
Sep 24, 2026
Merged

brianluong merged 2 commits into
mainfrom
docs/portfolio-remove-false-networks-default

Conversation

@alchemy-bot

@alchemy-bot alchemy-bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Portfolio *-by-address reference pages currently render Defaults to ["eth-mainnet","base-mainnet","matic-mainnet"]. (or the equivalent "Defaults to Ethereum, Base, and Polygon mainnet." prose) on the networks field, but the API has no such default — networks is a required field on every request and there is no server-side fallback.

Root cause: four request schemas in src/openapi/portfolio/portfolio.yaml declared an array-level default: block on the networks property. Redocly renders that as the "Defaults to" hint on the reference pages. For TransfersByAddressRequest the same fact was also asserted as prose inside the field's description:.

Fix:

  • Removed the array-level default: on AddressItem, AddressItemForNFTOwnership, AddressItemWith20Maximum, and TransfersByAddressRequest.networks.
  • Removed the matching "Defaults to Ethereum, Base, and Polygon mainnet (same as the other Portfolio APIs)." sentence from TransfersByAddressRequest.networks.description.

Left untouched:

  • The item-level default: eth-mainnet on each array's items (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:

  • /docs/data/portfolio-apis/portfolio-api-endpoints/portfolio-api-endpoints/get-tokens-by-address
  • /docs/data/portfolio-apis/portfolio-api-endpoints/portfolio-api-endpoints/get-token-balances-by-address
  • /docs/data/portfolio-apis/portfolio-api-endpoints/portfolio-api-endpoints/get-nfts-by-address
  • /docs/data/portfolio-apis/portfolio-api-endpoints/portfolio-api-endpoints/get-nft-contracts-by-address
  • /docs/data/portfolio-apis/portfolio-api-endpoints/portfolio-api-endpoints/get-transfers-by-address

Validated with pnpm run validate:rest — 0 errors on the portfolio spec.

Requested by

@brianluong (via Slack thread)

…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
@alchemy-bot
alchemy-bot requested a review from a team as a code owner September 23, 2026 18:54
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

🔗 Preview Mode

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Sep 23, 2026, 6:59 PM

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
@brianluong
brianluong merged commit 4ba9639 into main Sep 24, 2026
15 of 16 checks passed
@brianluong
brianluong deleted the docs/portfolio-remove-false-networks-default branch September 24, 2026 16:12
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>
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.

3 participants