Add `type: string` to enum schemas for Swift OpenAPI Generator compatibility

Looking for some help getting JSONSchema.make to add type: string under enum schemas, which swift-openapi-generator requires to generate a Swift client from the OpenAPI document.

Currently, if I have the following Effect schema
S.Literal('foo', 'bar')

this generates the following JSON schema:
enum:
  - foo
  - bar

But swift-openapi-generator won't turn that schema into a Swift enum unless the schema is:
type: string
enum:
  - foo
  - bar
Was this page helpful?