'Structural error property type should be equal to one of the allowed values allowedValues: string, number, boolean, integer, array in Swagger editor
I'm using springfox 2.9.2 and want test my swagger JSON as YAML in https://editor.swagger.io/
I have property with @ApiParam
annotation type: object
@ApiParam(value = "metadata file")
protected Object metadataFile;
but when I test my generated json on swagger editor I got this error:
Structural error at ---.parameters.5.type should be equal to one of the allowed values allowedValues: string, number, boolean, integer, array Jump to line ---
there is way to allowed property type object in this section?
the section that trigger the problem
paths:
:
post:
parameters:
name: metadataFile
in: query
description: ...
required: false
type: object
Solution 1:[1]
Swagger documentation (go to the bottom of the page): https://swagger.io/docs/specification/2-0/describing-parameters/
"Can I have an object as a query parameter? This is possible in OpenAPI 3.0, but not in 2.0."
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | marcin |