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
In JSON pointers, the characters '~' and '/' need to be encoded as '~0' and '~1' respectively, when used in a reference token.
(See RFC 6901
The JsonReferenceResolver currently does not seem to support this, as it throws a InvalidOperationException: Could not resolve the path.
An example: For referencing a path named "/pets/{petid}" you'd use "$ref": "#/paths/~1pets~1{petId}".
Included is a zip file containing a .NET 6 project using NSwag.ApiDescription.Client to demonstrate the problem. Using the included broken.json and working.json in an online validator such as apitools.dev results in both examples validating, while trying to use broken.json in NSwagStudio also results in above exception.
I have also included the broken json file separately, as broken.txt.
The problematic statement can be found on line 55, under paths/~1pets/get/responses/default NSwagRefIssue.zip broken.txt
The text was updated successfully, but these errors were encountered:
In JSON pointers, the characters '~' and '/' need to be encoded as '~0' and '~1' respectively, when used in a reference token.
(See RFC 6901
The JsonReferenceResolver currently does not seem to support this, as it throws a InvalidOperationException: Could not resolve the path.
An example: For referencing a path named "/pets/{petid}" you'd use "$ref": "#/paths/~1pets~1{petId}".
Included is a zip file containing a .NET 6 project using NSwag.ApiDescription.Client to demonstrate the problem. Using the included broken.json and working.json in an online validator such as apitools.dev results in both examples validating, while trying to use broken.json in NSwagStudio also results in above exception.
I have also included the broken json file separately, as broken.txt.
The problematic statement can be found on line 55, under paths/~1pets/get/responses/default
NSwagRefIssue.zip
broken.txt
The text was updated successfully, but these errors were encountered: