Skip to content

Add Generate Spec to CLI & extend toSpec()#747

Merged
AbhinRustagi merged 7 commits into
mainfrom
ar-generate-spec
Jul 10, 2026
Merged

Add Generate Spec to CLI & extend toSpec()#747
AbhinRustagi merged 7 commits into
mainfrom
ar-generate-spec

Conversation

@AbhinRustagi

@AbhinRustagi AbhinRustagi commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Add generate-spec CLI command to export serialized library specifications as JSON, including component signatures, groups, and JSON schema definitions. This enables downstream tooling to consume library metadata for code generation and validation.

Changes

  • New CLI Command: openui generate-spec generates a serialized LibrarySpec containing:

    • Component signatures and metadata
    • Component groupings
    • Full JSON schema of all components with descriptions preserved
  • API Enhancements:

    • Add toJSONSchema() method to Library class to export component definitions as JSON Schema
    • Add LibrarySpec type that extends BaseSpec with embedded schema
    • Update toSpec() to include the schema alongside signatures and groups
    • Preserve component descriptions in serialized JSON schemas
  • Exports: Make LibrarySpec and buildComponentSignature publicly exported from lang-core

  • Documentation: Add CLI reference documentation for the new generate-spec command

Testing

  • Unit tests verify that toSpec() carries library JSON schema alongside component signatures
  • Tests confirm component descriptions are preserved in serialized output

@AbhinRustagi AbhinRustagi marked this pull request as ready for review July 10, 2026 04:24
@AbhinRustagi AbhinRustagi merged commit 8ecdcfd into main Jul 10, 2026
2 checks passed
@AbhinRustagi AbhinRustagi deleted the ar-generate-spec branch July 10, 2026 05:52
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.

2 participants