Open bwbroersma opened 5 years ago
Ok the previous commit / provided solution is not the correct way to do it, this will also result in an Example Value
{
"the-enum-array-field": "first-value"
}
were we would want more something like
{
"the-enum-array-field": ["first-value"]
}
The correct Swagger to output (according to the docs) is:
{
"format": "schema.typename[]",
"type": "array",
"items": {
"type": "string",
"enum": ["first-value", "second-value"]
}
}
Any update on this issue? We have an enum array column and would want the above mentioned response from the OpenApi response.
@kavitang-sa I don't think this will be fixed here (in the core repository), but it will be addressed in the postgrest-openapi
project.
Thanks @laurenceisla I'll create an issue there to address this.
I'll create an issue there to address this.
No need to do that, we will track it here.
I'll create an issue there to address this.
No need to do that, we will track it here.
Great, I just read this after creating an issue. I'll remove it, thank you @wolfgangwalther !
Enum looks nice in SwaggerUI, enum arrays do not. Here the changes that work for me for nice SwaggerUI output, but it might not be correct for the OpenAPI standard: code diff