It’s a bug :-/ There are no examples in non-body parameters in OpenAPI/Swagger 
2.0. This is changing in the next version of the spec.

 

In swagger-ui 2.1.x we had support for a vendor extension called ‘e-example’ to 
add such examples to the UI, but it’s not yet supported in the 3.X version.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Tom Johnson 
<tomjohnson1...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Friday, 16 June 2017 at 13:50
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: examples property for parameters object not documented?

 

Does the parameters object allow an example property, like this? 

 

      parameters:

        - name: lat

          in: query

          description: latitude

          type: string

          required: true

          example: 1.2.3

        - name: lng

          in: query

          description: longitude

          type: string

          required: true
          example: 4.5.6

 

I didn't see this listed in the parameters object documentation. However, when 
I add it, this populates the query parameter field in Swagger UI with the 
example value, which is what I want it to do. 

 

Did I just not see this parameter listed in the docs? Or is it a new feature 
not yet added to the docs?

 

Thanks,

 

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to