PostgREST / postgrest-openapi

OpenAPI output generated in SQL for a PostgREST instance
MIT License
20 stars 4 forks source link

Enum array does not include enum property in OpenApi response #48

Closed kvnam closed 2 months ago

kvnam commented 2 months ago

Hey,

The OpenApi response when the column type is an enum includes an enum property which lists all the values of the enum. This property is missing if the column is an array type. The expected output would be

{
  "format": "schema.typename[]",
  "type": "array",
  "items": {
    "type": "string",
    "enum": ["first-value", "second-value"]      // This property is currently missing
  }
}

It would be very helpful if this was resolved as our app needs it. If this is a simple enough issue and if you could direct me to the correct starting point I can attempt raising a fix for this as well.

Thanks!