Always include curl in HTTP snippets regardless of configuration #4271
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.
Always include curl in HTTP snippets regardless of configuration
This PR ensures that curl is always included in HTTP snippets, regardless of the
http-snippetsconfiguration in docs.yml.What was the motivation & context behind this PR?
Previously, users could disable curl snippets by:
http-snippets: falsehttp-snippets: [python, ruby]without curlThis led to confusion and support requests, as curl is the most universal HTTP client. Going forward, curl will always be displayed in the HTTP snippets selector. If users need to hide it from the UI, they must use custom CSS.
Related: Docs PR at fern-api/docs#1337 documents this new behavior.
Changes made
Core logic change (
backfill.tslines 92-101):shouldIncludeLanguage()to check for curl first and always returntruebefore evaluating other conditionsisHttpSnippetsEnabledcheck and language array filteringTest updates:
How has this PR been tested?
Review checklist
Critical areas to review:
falseand array configurationsRequested by: [email protected] (@dannysheridan)
Devin session: https://app.devin.ai/sessions/3bd4ed16edfa4afb82458e4cfa4e46d2