Skip to content

Add Body Parameter command inserts at document root #243

@anthony-42crunch

Description

@anthony-42crunch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions