How Do I Display Examples with FormData in Swagger UI?

56 views
Skip to first unread message

Jennifer Coston

unread,
Jul 5, 2016, 9:17:30 AM7/5/16
to Swagger
Hello,

I have an API that is displaying as below. However, I want it to show an example of the format for the json string that the user is required to enter with a larger box for the users to enter it. Is it possible to specify any of this is my YAML?



Here is my current YAML:

paths:
 
/Plugin:
    post:
      tags:
        - Plugin
      summary: Upload Plugin
      description: This can only be done by the logged in user.
      operationId: createPlugin
      consumes:
      - "multipart/
form-data"
      produces:
        - application/json
        - application/xml
      parameters:
        - in: formData
          name: json
          description: Uploaded Plugin
          required: true
          type: string
        - in: formData
          name: jarFile
          description: Jar File to upload
          required: true
          type: file
        - in: formData
          name: configFile
          description: config File to upload
          required: true
          type: file
      responses:
        200:
          description: successful operation



Thanks!
Jennifer

Auto Generated Inline Image 1
Message has been deleted

smk

unread,
Jul 28, 2016, 5:48:52 PM7/28/16
to Swagger
Hi

I am facing the same issue. Can you please provide a solution if you resolved it? 

Jennifer Coston

unread,
Jul 28, 2016, 6:47:39 PM7/28/16
to swagger-sw...@googlegroups.com

It turns out this functionality isn't supported by the UI.

- Jennifer


On Jul 28, 2016 5:46 PM, "smk" <smuk...@gmail.com> wrote:
Hi , 

I am facing the same issue. Can you please provide an solution if you resolved it?

--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/w1_jPwWiGzE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

smk

unread,
Jul 28, 2016, 7:11:49 PM7/28/16
to Swagger
Thanks for the update. In that case is there a way where we could write a custom json schema and let swagger find it to display in the model/schema.?
do you have any workarounds for this.?
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages