Skip to content

Generated data editors: let a code generator consume a DataSource #126

Description

@matt-edmondson

Split out of #120, item 3, now that items 1 and 2 (path resolution, and loading/validating bound data) have landed.

Problem

A DataSource binds a data file to a SchemaClass, and as of #120 that data can be resolved and validated against its class. Nothing yet produces anything from that binding.

Scope

Extend the code generation architecture from #119 so a generator can take a DataSource — the class plus the file binding — and emit a typed editor for that data.

This depends on #119 landing first: there is no generator abstraction to extend until it exists.

Notes

  • The conformance rules a generated editor must enforce are already implemented in SchemaDataValidator, and the data-file conventions (root shape, per-type JSON representation, required members, map key agreement) are documented in docs/schema-format.md. A generated editor should not invent a second, divergent set.
  • Schema.SourceDirectory and DataSource.TryResolveFile give the generator the anchor it needs to find the data.

Acceptance criteria

  • A code generator can be configured to target a data source.
  • It emits an editor for data conforming to the bound class.
  • The generated editor accepts exactly the data SchemaDataValidator accepts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions