docs: exclude internal-only envd endpoints (fixes mintlify dev ENAMETOOLONG) - #331
Closed
beran-t wants to merge 2 commits into
Closed
docs: exclude internal-only envd endpoints (fixes mintlify dev ENAMETOOLONG)#331beran-t wants to merge 2 commits into
beran-t wants to merge 2 commits into
Conversation
Six internal-only envd endpoints (/freeze, /unfreeze, /collapse, /fsfreeze, /fsthaw, /files/compose) were leaking into the generated openapi-public.yml. The SDKs never call them and the generator docstring already states they should not appear in public docs. Their summaries are multi-sentence engineering notes. Mintlify derives an API-reference page filename from each operation's summary, and /fsfreeze's summary produces a >255-byte filename that macOS rejects with ENAMETOOLONG, aborting 'mintlify dev' entirely. They slipped through because filter_paths()'s excluded_exact only listed /init and their auth scheme is not flagged internal, so the admin-auth filter did not catch them. Add them to excluded_exact and regenerate the spec (227 lines removed). mintlify dev now boots with the API-reference anchor and no ENAMETOOLONG.
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Preview was torn down when the PR was closed; reopen re-ran the GitHub checks but did not rebuild the Mintlify preview. Empty commit to kick a fresh deployment. No content change.
Contributor
Author
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
mintlify devcrashes on macOS before serving anything:Mintlify generates one API-reference page per OpenAPI operation and derives the filename from the operation
summary. Six internal-only envd endpoints leaked into the generatedopenapi-public.ymlwhosesummaryfields are multi-sentence engineering notes./fsfreeze's summary produces a filename over the 255-byte macOS limit, aborting the whole build.Why these endpoints should not be here anyway
The generator's own docstring states the envd spec comes from the curated public copy in
e2b-dev/E2B, which is supposed to exclude internal-only endpoints like/freeze,/collapse,/files/compose. The SDKs never call them. They slipped through becausefilter_paths()'sexcluded_exactonly listed/init, and their auth scheme is not one of the internal markers, so the admin-auth filter did not drop them.Fix
scripts/generate_openapi_reference.py: add the six internal envd paths (/freeze,/unfreeze,/collapse,/fsfreeze,/fsthaw,/files/compose) toexcluded_exactinfilter_paths().openapi-public.yml: regenerated effect - those six path blocks removed (227 lines). YAML re-validated (55 paths, anchors intact, legitimate/fileskept).Both change together on purpose:
openapi-public.ymlis regenerated weekly by.github/workflows/api-reference-validation.yml, so without the generator patch the weekly run would re-add the leaked paths.Verification
mintlify devnow boots with the fulldocs.json(API-reference anchor included), zero ENAMETOOLONG, and API-reference pages render.Follow-up (not in this PR)
The upstream curated envd spec in
e2b-dev/E2Bappears to still carry these internal endpoints. Worth fixing there too so the exclusion here is defense-in-depth rather than the only guard.