-
Notifications
You must be signed in to change notification settings - Fork 19
Add API Reference to docs navigation #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 42 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
d85320e
Add API Reference section to docs navigation
beran-t b4058d4
Add OpenAPI generation and validation scripts
beran-t c6d4091
Rename envd.py to generate_openapi_reference.py
beran-t 251e109
Refactor generate script to fetch specs from e2b-dev/infra
beran-t 86bb0f6
Require sandbox access token auth on all envd endpoints
beran-t 4965943
Fix auth schemes: restore AccessTokenAuth (Bearer), add E2B_ACCESS_TO…
beran-t b96ca6a
Add E2B_ACCESS_TOKEN support and improve team ID discovery
beran-t 983af3e
Fix spec validation findings: 20 critical → 0
beran-t 5c3a60d
Strip content blocks from 204 responses
beran-t 6231794
Prefix auth description links with /docs
beran-t affb569
Add success-path tests for all template write endpoints
beran-t 5e22f76
Fix 8 spec issues found during SDK testing
beran-t 6c6e989
Fix 12 spec inconsistencies from SDK testing report
beran-t b2eb09e
Fix schema and consistency issues from second SDK testing round
beran-t 793ac50
Fix duplicate and misspelled operationIds
beran-t 442ff73
Exclude snapshots/volumes endpoints, merge auth tests into Teams phase
beran-t 8dc0e71
Rename and reorder API reference tags for documentation sidebar
beran-t b1e9f81
Reorder paths by tag to match desired Mintlify sidebar order
beran-t 9cc30ab
Tag untagged endpoints (/metrics, /envs) as Others so they appear in …
beran-t 700325c
Add meaningful examples to error responses (400/401/403/404/409/500)
beran-t 709f99b
Inline /files response definitions so Mintlify renders them correctly
beran-t 2a8820d
Move error example to Error schema so it applies to all references
beran-t b93b5d3
Add per-status error examples so each error response shows correct co…
beran-t fe16f73
Lowercase 'reference' in SDK reference and API reference anchors
beran-t d9f1bac
Add short summaries to all platform endpoints for readable Mintlify s…
beran-t 2e0f689
Set format: int64 on Metrics memory/disk fields to prevent overflow
beran-t 3fc1e08
Replace nullable: true with OpenAPI 3.1.0 type arrays on 14 properties
beran-t 296ba47
Fix validation script: correct expected statuses, remove internal end…
beran-t 88cae61
Hide deprecated badges in sidebar to prevent endpoint name truncation
beran-t d6b8211
Add API reference validation workflow (manual trigger only for now)
beran-t 1699b47
Fix validation script: remove Bearer-only tests, move alias test to p…
beran-t 517a91e
Remove openapi-validation-report.md from repo
beran-t f3a2039
Hide scrollbar on sidebar API endpoint rows with deprecated badges
beran-t 6ea99a4
edit workflow
beran-t 171c2bf
test true
beran-t af07c2e
works, back to false
beran-t 35eb524
Make workflow run on schedule (disabled for now)
beran-t d4fa03b
Add snapshots endpoints and update auto-resume config in API reference
beran-t 238d7e3
Map snapshots tag to Sandboxes section in generate script
beran-t 43608a4
Remove validation script and simplify workflow to generate-and-PR only
beran-t 7734168
Remove example fields from generate script and regenerate spec
beran-t f51d26f
Merge main into add-api-ref-to-nav and resolve docs.json conflict
beran-t a2c645a
Update docs.json
jakubno 244e03c
Reorder API reference sidebar: move Tags under Templates, rename Othe…
beran-t d9425ca
Merge branch 'main' into add-api-ref-to-nav
beran-t 1db8c61
Merge branch 'main' into add-api-ref-to-nav
beran-t File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| name: API Reference Validation | ||
|
|
||
| on: | ||
| # schedule: | ||
| # # Every Thursday at 8 PM UTC | ||
| # - cron: '0 20 * * 4' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: api-reference-validation | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| validate: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
|
|
||
| - name: Install dependencies | ||
| run: pip install pyyaml | ||
|
|
||
| # Step 1: Generate spec from source | ||
| - name: Generate OpenAPI spec | ||
| run: python3 scripts/generate_openapi_reference.py --output openapi-generated.yml | ||
|
|
||
| # Step 2: Compare with committed spec | ||
| - name: Compare specs | ||
| id: diff | ||
| run: | | ||
| if diff -q openapi-public.yml openapi-generated.yml > /dev/null 2>&1; then | ||
| echo "Spec is up to date — nothing to do" | ||
| echo "changed=false" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "Spec has drifted from source" | ||
| echo "changed=true" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| # Step 3: Create PR if spec has drifted | ||
| - name: Create PR | ||
| if: steps.diff.outputs.changed == 'true' | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| cp openapi-generated.yml openapi-public.yml | ||
|
|
||
| BRANCH="api-spec-update-$(date +%Y-%m-%d)" | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| git checkout -b "$BRANCH" | ||
| git add openapi-public.yml | ||
| git commit -m "docs: update openapi-public.yml from source specs $(date +%Y-%m-%d)" | ||
| git push -u origin "$BRANCH" | ||
|
|
||
| gh pr create \ | ||
| --title "Update API spec $(date +%Y-%m-%d)" \ | ||
| --body "$(cat <<EOF | ||
| ## OpenAPI Spec Update | ||
|
|
||
| The generated \`openapi-public.yml\` has drifted from the source specs. | ||
| This PR updates it to match the latest upstream definitions. | ||
| EOF | ||
| )" \ | ||
| --base main | ||
|
|
||
| - name: Summary | ||
| if: always() | ||
| env: | ||
| CHANGED: ${{ steps.diff.outputs.changed }} | ||
| run: | | ||
| echo "## API Reference Spec Check" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "| Result | Value |" >> $GITHUB_STEP_SUMMARY | ||
| echo "|--------|-------|" >> $GITHUB_STEP_SUMMARY | ||
| echo "| Spec changed | ${CHANGED:-false} |" >> $GITHUB_STEP_SUMMARY |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.