swagger.io icon indicating copy to clipboard operation
swagger.io copied to clipboard

Non-encoded $ref on https://swagger.io/docs/specification/using-ref/#escape

Open abhijitkane opened this issue 6 years ago • 1 comments

On https://swagger.io/docs/specification/using-ref/#escape, there's a section that says:

For example, to refer to the path /blogs/{blog_id}/new~posts, you would use:

$ref: '#/paths/~1blogs~1{blog_id}~1new~0posts'

The / and ~ are encoded to ~1 and ~0 respectively. However, the curly braces around blog_id aren't percent-encoded (RFC3986), and this throws an error on editor.swagger.io:

Screen Shot 2019-08-11 at 11 17 08

The $ref should be #/paths/~1blogs~1%7Bblog_id%7D~1new~0posts

abhijitkane avatar Aug 11 '19 05:08 abhijitkane

@abhijitkane @hkosova is there a way I can can help move this query forward?

bzmw avatar Aug 30 '19 13:08 bzmw