You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When OpenApiWalker calls OpenApiVisitorBase.Enter(), it encodes / to ~1 but neglects to encode the ~ char first, inside the ReplaceSlashes() helper function. This results in the OpenApiVisitorBase.PathString property occasionally generating an invalid JSON pointer, such as during any of the built-in validation rules.
This can be seen by creating a document with a validation error under a property that contains a '~' in the name, and looking at the resulting OpenApiError.Pointer.
Expected behavior
When validated with ValidationRuleSet.GetDefaultRuleSet(), validator should return an OpenApiError with the Pointer set to #/components/schemas/my~0schema/nullProp.
Instead, the Pointer is currently set to #/components/schemas/my~schema/nullProp, which is not a valid pointer.
Why is this a problem
The current format where tildas are not escaped is ambiguous. There's no way to distinguish between an encoded / and a literal ~1 string.
This prevents other tooling from being able to use the JSON pointer to highlight problems in the document.
Activity
baywet commentedon Mar 17, 2026
Hi David Reaburn (@davidrea-MS)
Thank you for using the SDK and for reaching out.
I put together PR #2783
Let us know if you have any additional comments or questions.