Closed olivermt closed 1 month ago
Describe the bug
defmodule SomeType do use Ash.Type.Enum, values: [foo: "foo", bar: "bar"] end
This ends up in openapi as:
{ "additionalProp1": {} },
To Reproduce Just make any kind of enum, either with :atom, constrains: [one_of: [...]] or with the included Ash.Type.Enum sample
:atom, constrains: [one_of: [...]]
Expected behavior Be exposed as swagger enums: https://swagger.io/docs/specification/data-models/enums/
** Runtime
I've made two changes: 1. it will now properly render enums since that was low hanging fruit, and 2. unknown types now properly show as "any" instead of "object".
Describe the bug
This ends up in openapi as:
To Reproduce Just make any kind of enum, either with
:atom, constrains: [one_of: [...]]
or with the included Ash.Type.Enum sampleExpected behavior Be exposed as swagger enums: https://swagger.io/docs/specification/data-models/enums/
** Runtime