OAI / OAI/OpenAPI-Specification
More example `same hierarchy` in path templating
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 31.2k
- Forks
- 9.2k
- Avg merge
- 6h 37m
- Merged PRs (30d)
- 27
Description
We can't describe different templated name with same hierarchy.
Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical.
But I can't understand what the same hierarchy means.
We can't describe these path templates
/pets/{petId}
/pets/{name}
But we can describe these?
/pets/{petId}
/pets/{name}/hello
These depth of the hierarchy is different but these is different templated name in same depth of hierarchy.
When we get /pets/1/hello we can match bottom paths and name=1.
These is partially the same, but the whole is different.
So I want to add more example to this section.
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
Find the specification section containing the quoted “same hierarchy” rule and read the surrounding path-templating guidance. Add an example clarifying why /pets/{petId} and /pets/{name} conflict while the deeper /pets/{name}/hello path differs, then check that the wording matches the rule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100