a2ui-project / a2ui-project/a2ui

Allow developers to define ComponentApis using raw JSON schemas rather than Zod objects

Ouverte
#1,248 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
P2 sprint ready type: feature/enhancement
Langage dominant
TypeScript
Étoiles
16.4k
Forks
1.3k
Merge moyen
2 j 13 h
PR mergées (30 j)
134

Description

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:

1. Migrate to Zod 4 which has `z.fromJSONSchema()` - https://zod.dev/json-schema
2. Tell developers to use https://www.npmjs.com/package/json-schema-to-zod or similar
3. Migrate our underlying logic to use raw JSON schemas instead of Zod

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Look at the ComponentApi and ComponentImplementation classes to understand how Zod schemas are currently used. Investigate the Zod 4 migration path and json-schema-to-zod library. Determine the best approach for integrating raw JSON schemas, considering backward compatibility and developer experience.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, typescript
Domaine
backend-api-design, tooling
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.