swagger-api / swagger.io-docs

The content of swagger.io
https://swagger.io/docs/
1.56k stars 400 forks source link

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

Open abhijitkane opened 5 years ago

abhijitkane commented 5 years ago

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

bzmw commented 5 years ago

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