elements icon indicating copy to clipboard operation
elements copied to clipboard

string property in multipart/form-data body appears as array in example request

Open bokub opened this issue 2 years ago • 1 comments

Hello, I think I found a bug in the visualizer.

I have a key property which is supposed to be a string in my multipart/form-data request body:

info:
  version: "0"
servers:
  - url: https://example.com
openapi: 3.0.3
paths:
  /test:
    post:
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                key:
                  type: string
                  example: Hello World
              required:
                - key

However, the elements library displays the example string as an array instead of a simple string.

image

bokub avatar Jan 13 '23 15:01 bokub

Same here. How should I can send object using StopLight TryIt?

hosni avatar Dec 25 '23 14:12 hosni