Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Body Parameter command inserts at document root #243

Open
anthony-42crunch opened this issue Oct 5, 2023 · 0 comments
Open

Add Body Parameter command inserts at document root #243

anthony-42crunch opened this issue Oct 5, 2023 · 0 comments

Comments

@anthony-42crunch
Copy link
Contributor

anthony-42crunch commented Oct 5, 2023

VSCode v1.83.0 on MAC
OpenAPI Editor v4.18.6

Issue to fix:
the "Add Body Parameter" command inserts a Parameters object at the root level of the OpenAPI document, which is invalid.

Uploading Parameters_is_not_allowed.png…

Expected behavior:
The command should add a Parameter object as a child of an existing Parameters object
If no Parameters object exists, the command should insert a Parameters Object and child Parameter object at a valid point in the OpenAPI document.

Suggestion:
the level in the document hierarchy where the insertion takes place (e.g. components, path item, operation item) should depend on where in the doc the user has clicked before the command is run.

Additional info:

I've tried the command both with and without an existing Parameters object in the doc. The behavior is the same.
I've also tried click at different levels inside the doc before running the command, but the insertion always is made at the doc root.

Add_Body_Parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant