docs: focus README on application developers, move agent content to M… #6
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: validate-examples | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| schedule: | |
| # Weekly: catch docs drifting from the live API even with no commits | |
| - cron: "0 12 * * 1" | |
| jobs: | |
| lint-openapi: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Lint OpenAPI spec | |
| run: npx --yes @redocly/cli@1 lint openapi/costkits.v1.yaml --skip-rule=operation-4xx-response --skip-rule=no-server-example.com | |
| run-demo-examples: | |
| # Only exercises the unauthenticated demo endpoint — no secrets in CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: curl example (demo endpoint) | |
| run: bash examples/curl/demo-estimate.sh | |
| - name: Demo response shape matches docs | |
| run: | | |
| body=$(curl -sf https://api.costkits.com/v1/demo/estimate) | |
| echo "$body" | python3 -c ' | |
| import json, sys | |
| r = json.load(sys.stdin) | |
| for key in ("procedure", "estimated_total_allowed_amount", "billing_components", "data_vintage"): | |
| assert key in r, f"missing key: {key}" | |
| print("demo response OK:", r["procedure"], r["data_vintage"]) | |
| ' | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: JavaScript example (demo endpoint) | |
| run: node examples/javascript/demo-estimate.js | |
| - name: Python example (demo endpoint) | |
| run: python3 examples/python/demo_estimate.py |