Thanks Ron. Am I understanding you correctly to think the examples property
will be added to the 3.0 version of the spec but it's not there now? The
only reason examples works in 2.0 with the Swagger UI 3.0 is due to a
coincidental vendor extension?

I'm trying to decide whether to leave my examples in there or not. At one
point I was getting an error in the Swagger Editor based on these
properties (something like, "One is not an instance of ...) but then the
errors went away.

Tom

---------------------
email: [email protected]
phone: 408-540-8562
blog: idratherbewriting.com
twitter: @tomjohnson


On Sat, Jun 17, 2017 at 9:50 AM, Ron Ratovsky <[email protected]> wrote:

> 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: *<[email protected]> on behalf of Tom Johnson
> <[email protected]>
> *Reply-To: *"[email protected]" <
> [email protected]>
> *Date: *Friday, 16 June 2017 at 13:50
> *To: *Swagger <[email protected]>
> *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
> <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameter-object>.
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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/7EkCFVPdXoM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to