Issue with `$defs` Not Propagating Past Array Schemas in JSON Schema Generation

Is it intended behavior for $defs to not propogate "up" past array schemas? e.g.
const Element = S.Struct({ ... }).annotations({ identifier: "Element" })
const Container = S.Struct({ elements: S.Array(Element) })

console.log(yaml.stringify(JSONSchema.make(Container)))

generates
- type: object
  required:
    - elements
  properties:
    elements:
      type: array
      items:
        $ref: #/defs/Element
        $defs:
          Element: ...
Was this page helpful?