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.
MIT License
170 stars 47 forks source link

The request body disappears when the model is live updated #43

Closed fungiboletus closed 5 years ago

fungiboletus commented 6 years ago

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"
polarweasel commented 6 years ago

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

polarweasel commented 6 years ago

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

thattolleyguy commented 5 years ago

Any update on this issue? Thanks

osdiab commented 5 years ago

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.