fix: remove x-codeSamples so playground examples update live (#1015) (backport to release/1.16.0) - #1016
Merged
Conversation
Hand-written x-codeSamples blocks on 11 endpoints replaced Mintlify's auto-generated request samples with static cURL, so the playground ignored typed values and offered no other language tabs. Headless-browser tests confirmed autogen now covers every case they were added for: multipart renders --form samples and typed values appear live in all snippet languages. Remove all 33 blocks (en/zh/ja), invert the lint guard to flag any x-codeSamples occurrence, rewrite the spec-conventions rule, add a curl -N tip to the SSE streaming guide (the only content the removed samples uniquely carried), and link the guide from the Stream Workflow Events description. (cherry picked from commit 236fcaa)
Contributor
There was a problem hiding this comment.
Pull request overview
Backports the “remove x-codeSamples so playground examples update live” change set to release/1.16.0, ensuring Mintlify’s API playground uses schema-driven, live-updating, multi-language autogenerated request snippets instead of static operation-level overrides.
Changes:
- Removed all remaining OpenAPI
x-codeSamplesoperation extensions in the Service API specs (en/zh/ja) and linked the SSE streaming guide from the workflow-events streaming operation description. - Added an SSE guide tip in en/zh/ja documenting
curl -N(--no-buffer) for real-time event printing. - Updated
lint_specs.pyto flag anyx-codeSamplesoccurrence to prevent reintroduction, and updated the spec conventions reference accordingly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| zh/api-reference/openapi_service.json | Removes x-codeSamples overrides and adds an inline link to the SSE streaming guide for workflow event streaming. |
| zh/api-reference/guides/streaming.mdx | Adds a Tip documenting curl -N for SSE testing. |
| tools/api-pipeline/lint_specs.py | Changes linting to flag any x-codeSamples presence (ban static samples). |
| ja/api-reference/openapi_service.json | Removes x-codeSamples overrides and adds an inline link to the SSE streaming guide for workflow event streaming. |
| ja/api-reference/guides/streaming.mdx | Adds a Tip documenting curl -N for SSE testing. |
| en/api-reference/openapi_service.json | Removes x-codeSamples overrides and adds an inline link to the SSE streaming guide for workflow event streaming. |
| en/api-reference/guides/streaming.mdx | Adds a Tip documenting curl -N for SSE testing. |
| .claude/skills/dify-docs-api-reference/references/spec-conventions.md | Updates internal spec conventions to prohibit x-codeSamples and point to the streaming guide for SSE curl mechanics. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Backport
This will backport the following commits from
maintorelease/1.16.0: