feat(schema): add semantic schema generation as default mode
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
schema-generate now builds content-aware schemas from the document's section hierarchy instead of counting markdown syntax elements. Detects key-value tables, data tables, link lists, and mixed content patterns to produce schemas that reflect the actual document outline. Old behavior preserved via --mode syntactic. Validator and visualization tools pinned to syntactic mode for compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -63,7 +63,7 @@ class SchemaValidator:
|
||||
|
||||
# Generate the document's current structure
|
||||
try:
|
||||
document_schema = self.schema_generator.generate_schema_from_file(file_path)
|
||||
document_schema = self.schema_generator.generate_schema_from_file(file_path, mode='syntactic')
|
||||
except Exception as e:
|
||||
raise SchemaValidationError(f"Failed to generate document schema: {e}") from e
|
||||
|
||||
@@ -307,7 +307,7 @@ class SchemaValidator:
|
||||
|
||||
# Generate the document's current structure
|
||||
try:
|
||||
document_schema = self.schema_generator.generate_schema_from_file(file_path)
|
||||
document_schema = self.schema_generator.generate_schema_from_file(file_path, mode='syntactic')
|
||||
except Exception as e:
|
||||
error_collector.add_error(
|
||||
ValidationErrorType.STRUCTURAL_VIOLATION,
|
||||
|
||||
Reference in New Issue
Block a user