Repository navigation
docs(openapi): remove agentic payments from the API spec #4944
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
| name: OpenAPI checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint specification | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7.1.0 | |
| with: | |
| node-version: 24 | |
| check-latest: true | |
| - uses: apify/actions/pnpm-install@v1.7.0 | |
| - name: Lint with Redocly | |
| run: pnpm openapi:lint:redocly --format=github-actions | |
| - name: Lint with Spectral | |
| run: pnpm openapi:lint:spectral --format=github-actions | |
| build: | |
| name: Build bundled specification | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7.1.0 | |
| with: | |
| node-version: 24 | |
| check-latest: true | |
| - uses: apify/actions/pnpm-install@v1.7.0 | |
| - name: Build bundles | |
| run: pnpm openapi:build | |
| - name: Upload bundles | |
| uses: actions/upload-artifact@v7.0.2 | |
| with: | |
| name: openapi-bundles | |
| path: | | |
| static/api/openapi.json | |
| static/api/openapi.yaml | |
| retention-days: 1 | |
| validate: | |
| name: Validate bundled specification | |
| runs-on: ubuntu-latest | |
| needs: [lint, build] | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7.1.0 | |
| with: | |
| node-version: 24 | |
| check-latest: true | |
| - uses: apify/actions/pnpm-install@v1.7.0 | |
| - name: Download bundles | |
| uses: actions/download-artifact@v8.0.2 | |
| with: | |
| name: openapi-bundles | |
| path: static/api/ | |
| - name: Validate YAML bundle | |
| run: pnpm exec redocly lint static/api/openapi.yaml | |
| - name: Validate JSON bundle | |
| run: pnpm exec redocly lint static/api/openapi.json | |
| # Guards against docs teaching routes the contract doesn't define - notably the legacy | |
| # `/v2/acts` alias, which responds but is absent from the published spec (#2804). | |
| - name: Check documented API paths exist in the spec | |
| run: pnpm test:api-paths | |
| - name: Check bundle sizes | |
| run: | | |
| JSON_SIZE=$(stat -f%z static/api/openapi.json 2>/dev/null || stat -c%s static/api/openapi.json) | |
| YAML_SIZE=$(stat -f%z static/api/openapi.yaml 2>/dev/null || stat -c%s static/api/openapi.yaml) | |
| echo "Bundle sizes:" | |
| echo " JSON: $JSON_SIZE bytes" | |
| echo " YAML: $YAML_SIZE bytes" | |
| if [[ "$JSON_SIZE" -lt 1000 ]] || [[ "$YAML_SIZE" -lt 1000 ]]; then | |
| echo "Error: Bundle files are suspiciously small" | |
| exit 1 | |
| fi | |
| echo "✓ Bundles have valid sizes" |