Some developers want to define a ComponentApi (and a ComponentImplementation) based on a JSON schema that they already maintain in a format other than Zod, e.g. a plain JSON schema object, or a TS interface etc.
Currently, ComponentApi exposes a Zod object as the schema, so this isn't really possible without Zod.
We would ideally have a story for this.
Options:
- Migrate to Zod 4 which has
z.fromJSONSchema() - https://zod.dev/json-schema
- Tell developers to use https://www.npmjs.com/package/json-schema-to-zod or similar
- Migrate our underlying logic to use raw JSON schemas instead of Zod
Some developers want to define a
ComponentApi(and aComponentImplementation) based on a JSON schema that they already maintain in a format other than Zod, e.g. a plain JSON schema object, or a TS interface etc.Currently,
ComponentApiexposes a Zod object as the schema, so this isn't really possible without Zod.We would ideally have a story for this.
Options:
z.fromJSONSchema()- https://zod.dev/json-schema