Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Always include curl in HTTP snippets regardless of configuration

This PR ensures that curl is always included in HTTP snippets, regardless of the http-snippets configuration in docs.yml.

What was the motivation & context behind this PR?

Previously, users could disable curl snippets by:

  • Setting http-snippets: false
  • Specifying an array like http-snippets: [python, ruby] without curl

This 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.ts lines 92-101):

  • Modified shouldIncludeLanguage() to check for curl first and always return true before evaluating other conditions
  • This ensures curl bypasses the isHttpSnippetsEnabled check and language array filtering

Test updates:

  • Added new test: "should always include curl even when httpSnippets is false"
  • Updated existing test to verify curl is included even when not in the language list
  • Both tests now expect curl to be defined in all scenarios

How has this PR been tested?

  • ✅ All unit tests pass (11 tests in backfill.test.ts)
  • ⚠️ Manual integration testing with full docs rendering not performed

Review checklist

Critical areas to review:

  1. Lines 93-96 in backfill.ts: Early return for curl bypasses all configuration checks - verify this is the intended behavior
  2. Breaking change impact: Confirm this aligns with product requirements and consider if existing users need migration guidance
  3. Lines 121-123 in backfill.ts: The curl deletion block will never execute now (since shouldIncludeLanguage always returns true for curl) - this is correct but worth noting
  4. Test coverage: Verify the two test cases adequately cover the new behavior for both false and array configurations

Requested by: [email protected] (@dannysheridan)
Devin session: https://app.devin.ai/sessions/3bd4ed16edfa4afb82458e4cfa4e46d2

devin-ai-integration bot and others added 2 commits October 20, 2025 21:29
- curl is now always included even when http-snippets is set to false
- curl is always included even when http-snippets is an array that doesn't include curl
- Added test to verify curl is included when http-snippets is false
- Updated existing test to verify curl is included when not in language list

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants