swagger-api / swagger-api/swagger.io-docs
Non-encoded $ref on https://swagger.io/docs/specification/using-ref/#escape
Nobody has claimed this yet.
- Dominant language
- Astro
- Stars
- 1.6k
- Forks
- 407
- Avg merge
- 2m
- Merged PRs (30d)
- 2
Description
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:
The $ref should be #/paths/~1blogs~1%7Bblog_id%7D~1new~0posts
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the “Escape” section of the Using $ref documentation at swagger.io/docs/specification/using-ref/#escape and compare its example with RFC3986 and editor.swagger.io behavior. Update the example so the path parameter braces are encoded, then verify that the displayed reference matches the documented escaping rules.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100