arjun-g / vs-swagger-viewer

Swagger Viewer lets you preview and validate Swagger 2.0 and OpenAPI files as you type in Visual Studio Code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The request body disappears when the model is live updated

fungiboletus opened this issue · comments

The request body disappears when the model is live updated.

How to reproduce

Use the following model and preview it in swagger-viewer. Expand the /test method, it contains a form for the requestBody.
Update the model (add a letter in the summary for example). The form has disappeared.

openapi: 3.0.0
info:
  title: test
  version: "1.0.0"

paths:
  /test:
    post:
      summary: Test request body
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                ttl:
                  type: number
                  format: int64
      responses:
        "204":
          description: "ok"

Can confirm this is reproducible, with this and with my own OAS 3 spec.

Is this related to swagger-parser issue 765? If so, a new build might resolve this one.

Any update on this issue? Thanks

I too am experiencing this. Switching to OpenApi designer in the meantime, as it doesn't experience this bug and seems to do what I need as well.