Skip to content
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

[DNM] feat(docs): turn on http snippets by default #5831

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dannysheridan
Copy link
Member

@dannysheridan dannysheridan commented Feb 2, 2025

this PR proposes:

  • HTTP snippets on by default
  • a config in docs.yml to turn HTTP snippets off

when turned on by default, we can delete the edge-config flag for http-snippets.

@dannysheridan dannysheridan requested review from abvthecity and removed request for dsinghvi February 2, 2025 16:08
Copy link

github-actions bot commented Feb 2, 2025

@dannysheridan dannysheridan changed the title feat(docs): turn on http snippets by default [DNM] feat(docs): turn on http snippets by default Feb 2, 2025
navigation:
- api: API Reference
snippets:
http: false # <--- disable HTTP snippets; defaults to true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the customer wants to customize their own set of httpsnippet targets?

See:
https://github.com/Kong/httpsnippet/tree/master/src/targets
For supported targets.

Ie "I only want to enable python and php"

Or "I want to show php snippets using http2 and guzzle"

Copy link
Member Author

@dannysheridan dannysheridan Feb 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call. added this idea in the latest commit.

what if I want:

  • SDK, typescript
  • HTTP, javascript fetch
  • SDK, python
  • HTTP, python requests

my current config doesn't allow this

@dannysheridan
Copy link
Member Author

relevant:

export interface VersionedSnippetLanguageConfiguration {
package: string;
version: string;
}
export interface SnippetsConfiguration {
python: string | VersionedSnippetLanguageConfiguration | undefined;
typescript: string | VersionedSnippetLanguageConfiguration | undefined;
go: string | VersionedSnippetLanguageConfiguration | undefined;
java: string | VersionedSnippetLanguageConfiguration | undefined;
ruby: string | VersionedSnippetLanguageConfiguration | undefined;
}
}

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

Successfully merging this pull request may close these issues.

2 participants