Skip to content

Conversation

@FlatBallFlyer
Copy link
Contributor

No description provided.

Mike Storey added 13 commits July 22, 2025 14:10
… (object, array, simple_primitive, complex_primitive, void)
…ay outputs, sync with refactored type rendering
…pe_renders in process_and_render integration tests
- Refactor TypeProperty to enforce consistent data structure with core attributes
- Remove _original_* logic and backward compatibility
- Fix backslash issues in type definitions (email, word patterns)
- Update passing_process test case with proper migration handling
- Regenerate verified outputs for database state and JSON schemas
- All tests passing: unit tests (26/26), type rendering (2/2), passing_process (3/3)
- Fix backslash issues in type definitions (url, word patterns)
- Add missing canonical type definitions (email, us_phone, identity, state_code, street_address, schedule)
- Add MONGO_CONNECTION_STRING for local development
- Regenerate workshop.1.0.0.0.yaml JSON schema
- All passing_complex_refs tests now passing (3/3)
- Follow existing test pattern: set env vars, initialize config, reset env vars
- Set MONGO_CONNECTION_STRING environment variable in test setUp for localhost
- Remove unnecessary MONGO_CONNECTION_STRING file from passing_complex_refs
- Maintains Docker compatibility while enabling local development
- All tests passing: TestProcess (3/3), TestComplexRefs (3/3)
- Replace old type_property schema with oneOf structure
- Add core attributes: name, description, type, required
- Define specific schemas for each type:
  * object: properties, additional_properties
  * array: items
  * simple_primitive: schema
  * complex_primitive: json_type, bson_type
  * custom types: just core attributes
- Remove obsolete primitive_type schema
- Update type schema to use type_property for root
- All tests passing with new consistent structure
🎯 CORE CHANGES:
- Refactor TypeProperty to use 'type' field for all primitive types
- Implement consistent structure: name, description, type, required (core attributes)
- Support types: object, array, simple_primitive, complex_primitive, void, custom types
- Remove all _original_* logic and backward compatibility

🔧 IMPLEMENTATION:
- TypeProperty.__init__() handles defaults and type-specific construction
- TypeProperty.to_dict() always includes core attributes + type-specific fields
- Object types: properties + additional_properties
- Array types: items (defaults to void type)
- Simple primitives: schema
- Complex primitives: json_type + bson_type
- Custom types: just core attributes

🧪 TESTING:
- Update unit tests to reflect new structure and defaults
- Fix integration tests with proper MongoDB connection handling
- Update all test case type definitions to canonical structure
- Regenerate verified outputs for passing_process test case
- Add _deep_sort utility for order-agnostic test comparisons

📚 DOCUMENTATION:
- Update OpenAPI schema with oneOf structure for type_property
- Remove obsolete primitive_type schema
- Accurate API documentation matching implementation

✅ VERIFICATION:
- All tests passing (100% green)
- No backward compatibility needed (pre-release)
- Clean, maintainable code structure
- Consistent behavior across all type definitions
- Remove temporary code that was writing new verified output files
- Tests now properly validate against existing verified output
- No more 'cheating' - tests actually test the expected behavior
- All tests still passing after cleanup
@FlatBallFlyer FlatBallFlyer merged commit 2690b52 into main Jul 23, 2025
@FlatBallFlyer FlatBallFlyer deleted the TypeProperty-refactor-to-use-type-for-primitive-types branch July 23, 2025 00:06
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