Yes, that is one way but I was keeping it as the last resort. I wanted to know if there is any built-in support in swagger to specify supported operators of a `filter` parameter instead of specifying in the description.
Thank you! Jay On Monday, October 30, 2017 at 12:27:15 PM UTC-7, Ron wrote: > > You can document `filters` as a parameter, but the actual structure of the > parameter value can pretty much only be described as a string. > > > > > > > > *From: *<[email protected] <javascript:>> on behalf of Jay < > [email protected] <javascript:>> > *Reply-To: *"[email protected] <javascript:>" < > [email protected] <javascript:>> > *Date: *Friday, October 27, 2017 at 17:45 > *To: *Swagger <[email protected] <javascript:>> > *Subject: *Documenting query parameter operators using Swagger > > > > Hi Everyone, > > > > We are developing some new APIs and will be using OData for providing > filters. We support multiple operators like eq, ne, and, not, contains, > startwith, endswith, etc. > > For existing APIs, we are using Swagger for documentation. These APIs have > simple query parameters and don't support any operators. > > > > For the new APIs, I want to know is there any way we can document OData > operators using Swagger. > > > > Sample queries: > > > > GET /users?filters=(firstName eq SAM) and (age le 35) > > GET /users?filters=(firstName eq SAM) and (age le 35) or > (contains(lastName, 'Tom')) > > > > Thank you! > > -- > 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] <javascript:>. > 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.
