redocly-cli
redocly-cli copied to clipboard
Fix joining paths with metadata
What/Why/How?
The join
command assumes all paths have only operations that are expected to be objects, but paths can also have string
fields like summary
and description
. This PR only treats objects as objects.
Reference
https://swagger.io/docs/specification/paths-and-operations/#:~:text=In%20OpenAPI%20terms%2C%20paths%20are,as%20GET%2C%20POST%20or%20DELETE.
Testing
There are no tests for this file, so no tests were added.
Screenshots (optional)
Check yourself
- [x] Code is linted
- [x] Tested with redoc/reference-docs/workflows
- [] All new/updated code is covered with tests
Security
- [x] Security impact of change has been considered
- [x] Code follows company security practices and guidelines
Thanks @TejasQ for raising the issue and providing a solution.
The path item object can also have a parameters
object at the top level.
https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#path-item-object
We should solve that as well.
Thanks @TejasQ for raising the issue and providing a solution.
The path item object can also have a
parameters
object at the top level.https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#path-item-object
We should solve that as well.
Please do 🙏 Thanks for your effort 🙇
So who does “we” in “we should solve that as well” exactly refer to? 😬
(We're deep into some other projects, and I hope we can get to this within a few weeks. I'll see if anyone else on the team can hop in.)
Hi,
The path item object can also have a parameters object at the top level.
OAI/OpenAPI-Specification@main/versions/3.0.3.md#path-item-object
We should solve that as well.
Is this really a blocker for this PR? The change looks rather minimal and it is solving an actual bug. Is there a chance to get it in and we create an issue for the path item object?
Hi @TejasQ, thanks for the PR.
Based on this PR we created this one to handle all possible fields in a PathItem object