Reorganize samples: move schemas into directories, restructure imports - #3
Merged
Conversation
added 4 commits
November 25, 2025 12:31
Core samples: - Move all schema files into their respective numbered directories - Each directory now contains schema.struct.json + example files - Update validate-all.ps1 with new paths - Update README.md with new directory structure Import samples: - Renumber examples from 03-06 to 01-04 - Move library schemas (person-library, financial-library) into 02-namespace-import/ - Update all import references to use relative paths - Update validate-imports.ps1 with new structure - Update README.md to document reorganized layout All validations pass successfully.
…dators
- Updated schema and instance validators to support all primitive types:
- Added int8, uint8, int16, uint16, int128, uint128, float8 validation
- Added integer type (alias for int32 per spec PR #16)
- Moved 'any' from primitive to compound types
- Updated 03-financial-types sample to demonstrate all types:
- Added number, integer, double, null, int16, int32 type usage
- Updated examples with new fields (weight, discountPercent,
paymentTermsDays, cancelledDate, sequenceNumber)
All 34 JSON Structure types are now covered across the samples.
Added tests for previously missing types: - int8, uint8, int16, uint16, int128, uint128 (extended integer types) - float8, double (floating point types) - integer (alias for int32) - duration (ISO 8601 duration strings) - any (accepts all value types) Total tests increased from 108 to 141.
…or schema validator - Added missing maxLength to STRING_VALIDATION_KEYWORDS - Added maxLength validation in _check_string_validation method - Added tests for all 27 primitive types via test_all_primitive_types_valid - Added tests for all 7 compound types via test_compound_types_recognized - Added tests for numeric validation keywords on all numeric types - Added tests for string-based numeric types (int64, uint64, int128, uint128, decimal) - Added maxLength validation tests (valid, negative, not-integer) - Added unknown type rejection test - Total schema validator tests increased from 68 to 122
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
This PR reorganizes the samples directory structure for better organization and clarity.
Core Samples Changes
schema.struct.json- the main schema filevalidate-all.ps1script for new structureREADME.mdwith new directory layoutImport Samples Changes
person-library/andfinancial-library/now in02-namespace-import/validate-imports.ps1scriptREADME.mdwith new structureValidation