Details
-
Bug
-
Status: Done
-
Critical
-
Resolution: Done
-
None
-
-
All
-
Small
Description
The issue
References to components which contain escaped characters (e.g. #/components/schemas/Foo~1Bar) are not properly resolved and are considered as broken references.
They are replaced by an inline object type, which alters the API definition.
Note that the issue can be reproduced in production.
Long description
Some characters are reserved in JSON references, so when using a token which contains these characters they are escaped in a special way.
For example a type named "Foo/Bar" should be encoded as "Foo~1Bar" when put in a JSON reference:
#/components/schemas/Foo~1Bar
and not (which would be an invalid reference):
#/components/schemas/Foo/Bar
We should properly unescape those reserved characters when trying to resolve those OAS 3 references.