Skip to content

Skip indexer properties in command and query validation#2299

Merged
einari merged 1 commit into
mainfrom
fix/validation-filter-indexer-properties
Jun 16, 2026
Merged

Skip indexer properties in command and query validation#2299
einari merged 1 commit into
mainfrom
fix/validation-filter-indexer-properties

Conversation

@einari

@einari einari commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Fixed

  • Command and query validation no longer throws Parameter count mismatch when the parameter graph contains a type with an indexer (for example a JsonElement held in an object-typed property). The recursive fluent validation filters now skip indexer properties.

The fluent validation filters walked every public property via reflection and
called GetValue(instance) with no arguments. For indexer properties (this[...])
that throws "Parameter count mismatch", which surfaced whenever a command or
query graph contained a type with an indexer — for example a JsonElement held
in an object-typed property. Skip indexer properties so validation traverses
the rest of the graph without throwing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@einari einari added the patch label Jun 16, 2026
@einari einari merged commit 1f04162 into main Jun 16, 2026
7 checks passed
@einari einari deleted the fix/validation-filter-indexer-properties branch June 16, 2026 22:02
@github-actions

Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.44.0

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.

1 participant