Trouble Generating JSON Schema with `JSONSchema.make` for Parsed Schemas

Struggling to get JSONSchema.make to work for my use case... any help appreciated 🙏

I define my request/response schemas for each endpoint using S.parseJson(<real schema>). However, this means that when I call JSONSchema.make on them, it just returns
$schema: http://json-schema.org/draft-07/schema#
$ref: "#/$defs/JsonString"
$defs:
  JsonString:
  type: string
  description: a JSON string
  title: JsonString

which is not remotely useful. How can I generate a JSON Schema for the underlying schema? I've tried drilling into the AST, but AST.getJSONSchemaAnnotation by itself always seems to return O.none, and I don't see how to call JSONSchema.make on an AST value
Was this page helpful?