Skip to content

Schema.standardSchemaV1 should include the schema itself #4494

@kwaa

Description

@kwaa

What version of Effect is running?

3.13.2

What steps can reproduce the bug?

import { JSONSchema, Schema } from 'effect'

const Person = Schema.Struct({
  name: Schema.optionalWith(Schema.NonEmptyString, { exact: true })
})

// TypeError: Cannot read properties of undefined (reading '_tag')
console.log(JSONSchema.make(Schema.standardSchemaV1(Person)))

What is the expected behavior?

Returns the json schema normally

What do you see instead?

TypeError: Cannot read properties of undefined (reading '_tag')

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions