Use object type query param in swagger documentation -


i have route encode object parameter in url query string.

when writing swagger documentation errors disallow me use schema/object types in query type parameter:

paths:   /mypath/:     get:       parameters         - in: path           name: someparam           description: param works           required: true           type: string           format: timeuuid #good param, works         - $ref: "#/parameters/mysortingparam" #this yields error  parameters:   mysortingparam     name: paging     in: query     description: holds various paging attributes     required: false     schema:       type: object       properties:         pagesize:           type: number         cursor:           type: object           properties:             after:               type: string               format: string 

the request query param having object value encoded in actual request.

even though swagger shows error @ top of screen object rendered correctly in swagger ui editor, error floating on top of documentation.

i don't think can use "object" query parameter in swagger spec query parameter supports primitive type (https://github.com/oai/openapi-specification/blob/master/versions/2.0.md#data-types)


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -