Skip to content

Conversation

@winhowes
Copy link
Owner

Motivation

  • Body filters previously used ad-hoc recursive subset matching which couldn't express patterns, numeric ranges or string-length constraints.
  • Move to a standard schema format so capabilities and operators can describe richer, well-specified rules.

Description

  • Add app/body_schema.go and wire JSON Schema validation helpers (compileBodySchema, validateBodySchema, validateBodySchemaDefinition, decodeJSONBody, formValuesToJSON) into allowlist and denylist checks (validateRequestReason, constraintMatchesRequest, validation paths).
  • Switch the JSON Schema library to github.com/santhosh-tekuri/jsonschema/v6 at v6.0.2 and configure the compiler to use Draft‑07 by default via compiler.DefaultDraft(jsonschema.Draft7).
  • Update capability generators (Slack, SendGrid) to emit JSON Schema bodies instead of ad-hoc value maps and update tests to assert the new schema shape.
  • Update docs, examples and validation to describe that methods.<name>.body is a JSON Schema (draft‑07); remove retired ad-hoc form/recursive match helpers.

Testing

  • Ran go test ./... and the package test suite completed successfully with all modified unit tests passing.

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0849472dfe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@winhowes
Copy link
Owner Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 109b7ec847

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@winhowes
Copy link
Owner Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 445583fe2e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants