Feat: Improve GenTool JSON schema DX: autocomplete, markdown docs, and quick reference#132
Open
AdamMomen wants to merge 3 commits intoaukilabs:mainfrom
Open
Feat: Improve GenTool JSON schema DX: autocomplete, markdown docs, and quick reference#132AdamMomen wants to merge 3 commits intoaukilabs:mainfrom
AdamMomen wants to merge 3 commits intoaukilabs:mainfrom
Conversation
- Introduced a GitHub Actions workflow for validating GenTool JSON schemas. - Added `gentool.schema.json` to define the schema for enum and interface JSON files. - Updated `package.json` to include a new script for schema validation. - Created `validate-schemas.js` to run schema validation using AJV. - Updated VSCode settings to recognize the new JSON schema.
…tion - Added `generate-schema-fragment.js` to generate `gentool.schema.generated.json` with enum values for parameterized types. - Updated `package.json` to run the new schema generation script as part of the `generate` command. - Enhanced `gentool.schema.json` with markdown descriptions for better documentation. - Modified `validate-schemas.js` to validate against the generated schema and strip IDE-specific keywords for compatibility.
- Added quick reference section for scripts and workflow for adding new interfaces or enums. - Included details on schema files and IDE support for better developer guidance. - Expanded common property patterns with examples for clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds JSON Schema support for GenTool enum/interface definitions with validation, IDE autocomplete, and documentation.
Changes
Schema & validation
gentool.schema.json— JSON Schema (draft 2020-12) for enum and interface definitionsvalidate-schemas.js— Validates allenum/*.jsonandinterface/*.jsonagainst the schema.github/workflows/gentool-schema.yml— CI workflow that runs schema validation on PRs.vscode/settings.json— Associates the schema with enum/interface JSON files for VS CodeType autocomplete
generate-schema-fragment.js— Generatesgentool.schema.generated.jsonwith enum values for parameterized types (CLASS_MIX:Vector3,ENUM:SolvePnPMethod,ARRAY_REF:float, etc.)gentool.schema.generated.json— Generated file (committed); updated bynpm run generate$refto the generated enums for autocomplete instead of regex patternsmarkdownDescriptionfor richer hover text in VSCode/CursorScripts & workflow
npm run generate— Runs code generation and schema fragment generationnpm run validate:schemas— Validates enum/interface JSON against the schemaDocumentation
sdk/gentool/README.md— Quick reference: scripts, workflow, schema overview, common property patternsScreenshots