Skip to content

Merge stable into develop - #1369

Merged
infrahub-github-bot-app[bot] merged 1 commit into
developfrom
stable
Sep 17, 2026
Merged

infrahub-github-bot-app[bot] merged 1 commit into
developfrom
stable

Conversation

@infrahub-github-bot-app

@infrahub-github-bot-app infrahub-github-bot-app Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Merging stable into develop after merging pull request #1357.


Summary by cubic

Adds structured location, received value, and reason fields to schema validation error details.

Each SchemaValidationErrorDetail now includes loc (a tuple of keys and indexes), input (the offending value), and reason (the error wording alone), alongside the existing field and message, which are rendered from those parts. This lets consumers report or forward errors without parsing message text.

Written for commit de03cbf. Summary will update on new commits.

Review in cubic

…1357)

* feat(schema): expose location, value and reason on validation error details

Every entry of `SchemaValidationResult.errors` now carries `loc` (the
field location as a tuple of keys and indexes), `input` (the value
received there) and `reason` (the wording alone), next to the unchanged
`field` and `message`, which are rendered from these parts by a single
helper. A consumer can report or forward each violation in a structured
form without parsing the message text.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* test(schema): assert field is the dotted rendering of loc on a concrete error

The parametrized check compared field and loc by rewriting brackets into
dots, which hid the rule it was testing. A dedicated test now shows one
nested error with its location tuple and rendered path side by side.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* test(schema): check field against loc for every rejected case

Drops a test that repeated the unknown-field detail test, asserts the
rendered field on the out-of-enum detail test, and restores the
field/loc consistency check across all unknown-field and out-of-enum
cases through a small helper that spells out the expected rendering.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: de03cbf
Status: ✅  Deploy successful!
Preview URL: https://6cd2ca52.infrahub-sdk-python.pages.dev

View logs

@infrahub-github-bot-app
infrahub-github-bot-app Bot merged commit ff707a8 into develop Sep 17, 2026
39 checks passed
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