This repository contains the code for the Commerce Web API documentation website. It is built using Adobe Edge Delivery Services and deployed to Adobe Developer.
The site covers REST, GraphQL, and SOAP APIs for Adobe Commerce and Magento Open Source, including API reference documentation for multiple release versions.
For local development, you need to start three servers:
-
Content server (this repo):
npm run dev
-
Code server (adp-devsite):
git clone https://github.com/AdobeDocs/adp-devsite cd adp-devsite npm install npm run dev -
Runtime connector (devsite-runtime-connector):
git clone https://github.com/aemsites/devsite-runtime-connector cd devsite-runtime-connector npm install npm run dev
Once all three servers are running, navigate to http://localhost:3000/commerce/webapi.
For common utilities and documentation, see the centralized README.
To lint Markdown files before pushing:
npm run lint:mdTo automatically fix linting errors:
npm run lint:md:fixTo check internal and external links, validate front matter, and more:
npm run lintTo validate the table of contents file:
npm run test:configThe GraphQL API reference is generated using SpectaQL. It reads local introspection schema files, applies a custom Markdown-output theme, and writes the result to src/pages/includes/autogenerated/. Each generated file is included in the API reference pages via <Fragment>.
To regenerate all schema versions:
npm run generate:graphql-api-docsTo regenerate a specific version:
npm run generate:graphql-api-docs:2.4.9
npm run generate:graphql-api-docs:2.4.8
npm run generate:graphql-api-docs:2.4.7
npm run generate:graphql-api-docs:2.4.6
npm run generate:graphql-api-docs:saasSee spectaql/README.md for full configuration and script documentation.
The schema files in spectaql/ are GraphQL introspection results retrieved from a running Adobe Commerce instance using apollo-cli:
npx apollo-cli download-schema $ENDPOINT_URL --output schema_X.Y.Z.jsonwhere $ENDPOINT_URL is the GraphQL endpoint of the target Commerce instance. Replace X.Y.Z with the appropriate version (for example, 2.4.9) and place the file in the spectaql/ directory before regenerating.