Skip to content

Use JsonPointer syntax - #348

Merged
jpraet merged 26 commits into
mainfrom
feature/#344-use-json-pointer-syntax
Aug 13, 2026
Merged

Use JsonPointer syntax#348
jpraet merged 26 commits into
mainfrom
feature/#344-use-json-pointer-syntax

Conversation

@usku01

@usku01usku01 commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Fixes#344

@usku01
usku01 requested a review from a teamJune 19, 2026 08:40
@jpraet

Copy link
Copy Markdown
Contributor

JsonPointer syntax only needs to be used for InEnum.BODY.
A query, path or header param with name "foo.bar" should be accepted.

@usku01

usku01 commented Jun 23, 2026

Copy link
Copy Markdown
CollaboratorAuthor

JsonPointer syntax only needs to be used for InEnum.BODY. A query, path or header param with name "foo.bar" should be accepted.

What if we have a query parameter which would be a list, shouldn't we add the index in the name? And what I mean by that is of the query param is named 'parameter.id', if we have an issue with the second member of the list, then the name in the issue should be 'parameter.id/1'?

@usku01

Copy link
Copy Markdown
CollaboratorAuthor

JsonPointer syntax only needs to be used for InEnum.BODY. A query, path or header param with name "foo.bar" should be accepted.

What if we have a query parameter which would be a list, shouldn't we add the index in the name? And what I mean by that is of the query param is named 'parameter.id', if we have an issue with the second member of the list, then the name in the issue should be 'parameter.id/1'?

I have applied changes to the implementation to allow "." in name

@jpraet

Copy link
Copy Markdown
Contributor

JsonPointer syntax only needs to be used for InEnum.BODY. A query, path or header param with name "foo.bar" should be accepted.

What if we have a query parameter which would be a list, shouldn't we add the index in the name? And what I mean by that is of the query param is named 'parameter.id', if we have an issue with the second member of the list, then the name in the issue should be 'parameter.id/1'?

I think it's fine to keep using parameter.id[1] there.
JSON Pointer is specifically for pointing to a specific value within a JSON object.

@usku01
usku01 requested a review from jpraetJune 26, 2026 09:15
@sonarqubecloud

Copy link
Copy Markdown

@usku01
usku01 requested a review from jpraetJuly 30, 2026 08:03

@jflabatBCSSjflabatBCSS left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Some minor comments, but they are really optional.

* Rename to convertToJsonPointerIfNeeded
* Don't call transformName for user-provided names,
rely on auto-covnersion instead
* Simplified JSON Pointer detection and accept "" as valid JSON Pointer
* Extract JsonPointerUtil.addIndex
@sonarqubecloud

Copy link
Copy Markdown

@jpraet
jpraet merged commit d5e8a1b into mainAug 13, 2026
3 checks passed
@jpraet
jpraet deleted the feature/#344-use-json-pointer-syntax branch August 13, 2026 06:39
Sign up for freeto 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.

Use JSON pointer syntax in "name" field for request body input validation issues

3 participants

@usku01@jpraet@jflabatBCSS