Skip to content

Exclude ActionTargetApi and StandardApi from POS targets JSON#3869

Merged
laurelthorburn merged 1 commit into2025-04from
2025-04-action
Feb 10, 2026
Merged

Exclude ActionTargetApi and StandardApi from POS targets JSON#3869
laurelthorburn merged 1 commit into2025-04from
2025-04-action

Conversation

@laurelthorburn
Copy link
Copy Markdown
Contributor

Background

TL;DR: For POS docs, ActionTargetApi and StandardApi were showing up in the generated targets API list even though they’re composite types made from other APIs we document (e.g. CartApi, ScannerApi, NavigationApi). We only want to list those constituent APIs in the docs, not the wrapper types—same idea as how StandardAPI is handled elsewhere.

Solution

  • Composite API filtering
    In build-docs-targets-json.mjs, we treat StandardApi and ActionTargetApi as composite APIs: we never add them to the per-target apis array or to the API reverse mappings. We still expand them (via getNestedApis) so their constituent APIs are included. That keeps the POS targets JSON in line with the APIs we actually document.

  • Output path logging
    The targets script now logs the full path where targets.json is written (e.g. when you run yarn docs:point-of-sale 2025-04), so it’s obvious where the file was generated.

🎩

  • Run yarn docs:point-of-sale <API_VERSION> (e.g. 2025-04) and confirm the printed path is correct and targets.json is written there.
  • Open the generated targets.json and confirm no target has ActionTargetApi or StandardApi in its apis array; only concrete APIs (CartApi, ScannerApi, etc.) appear.
  • Confirm the API reverse-mapping section of the JSON has no ActionTargetApi or StandardApi keys.

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

Treat composite APIs (StandardApi, ActionTargetApi) as wrapper types:
expand their constituent APIs in the generated targets but do not
list the composite names in per-target apis or API reverse mappings.
@laurelthorburn laurelthorburn merged commit 3e8239b into 2025-04 Feb 10, 2026
6 checks passed
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