Skip to content

Escape values in JSON custom formats - #570

Open
Mzack9999 wants to merge 1 commit into
devfrom
custom-json-escape
Open

Mzack9999 wants to merge 1 commit into
devfrom
custom-json-escape

Conversation

@Mzack9999

Copy link
Copy Markdown
Member

Closes #569

Proposed changes

  • For a custom provider with a JSON body (a JSON Content-Type header, or a custom_format that starts with { or [), {{data}} and custom_sprig values written inside a JSON string are JSON-escaped.
  • Values used outside a JSON string, and non-JSON formats, are sent unchanged.
  • README note on the new behavior.

Proof

New tests TestCustomFormatDataInJSONStringIsEscaped, TestCustomSprigValuesInJSONStringAreEscaped, TestCustomFormatRawDataIsForwarded, TestCustomFormatWithoutJSONIsUnchanged and TestInJSONString. pkg/providers/custom tests pass.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3830b5c2-d45d-4952-ad47-90d0ed3839ce

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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.

1 participant