Skip to content

Conversation

@michaeltlombardi
Copy link
Collaborator

PR Summary

Important

This PR depends on #1309 and will remain in draft until that PR is merged.

Prior to this change, the resource manifest, extension manifest, and configuration document structs in dsc-lib manually implemented the DscRepoSchema trait.

This change uses the new macro to derive the trait on those types and other types in the library that currently map to schema files. This change also makes an effort to correctly annotate types that aren't covered by the separate schemas, but as not all types map to a schema file, these changes don't fully cover all types that derive the JsonSchema trait.

This change prepares the library for further canonicalization steps to steer the generated schemas towards the definitions in the canonical schemas.

PR Context

@michaeltlombardi michaeltlombardi force-pushed the gh-538/main/dsc_repo_schema_trait_macro branch from 786f5b3 to 56ade57 Compare December 9, 2025 21:22
Prior to this change, adding the `DscRepoSchema` trait to any type
required manual implementation.

This change:

- Defines a new `dsc-lib-jsonschema-macros` crate to publish procedural
  macros related to JSON Schemas.
- Defines a derive macro for the `DscRepoSchema` trait.
- Provides integration testing for the new macro.

This change doesn't migrate the implementations for the `DscRepoSchema`
trait from manual to macro-derived in `dsc-lib`. Those changes should
follow separately.
Prior to this change, the resource manifest, extension manifest, and
configuration document structs in `dsc-lib` manually implemented the
`DscRepoSchema` trait.

This change uses the new macro to derive the trait on those types and
other types in the library that currently map to schema files. This
change also makes an effort to correctly annotate types that aren't
covered by the separate schemas, but as not all types map to a schema
file, these changes don't fully cover all types that derive the
`JsonSchema` trait.

This change prepares the library for further canonicalization steps to
steer the generated schemas towards the definitions in the canonical
schemas.
@michaeltlombardi michaeltlombardi force-pushed the gh-538/main/dsc_repo_schema_trait_macro branch from 56ade57 to 136c9f8 Compare December 10, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant