Merged
Conversation
Restructure Treaty to use actions as the primary contract abstraction, moving away from the previous request/response split model. Actions now encapsulate both request and response definitions with built-in versioning and execution support. Major changes: - Introduce Action as the core contract unit with base class and result handling - Move context handling (callable, DSL, workspace) under action namespace - Move REST info building and DSL under action/info/rest - Move executor inventory management under action/executor - Implement action-specific request and response entities with their own validators - Add comprehensive versioning system for actions: * Semantic versioning support * Version collection and factory * Version resolver and executor * Request execution context per version - Add action inventory system for managing multiple action definitions - Move controller DSL to use new action-based structure - Remove top-level base and result classes (now under action) - Remove standalone request/response/versions/context/executor/inventory modules - Update all documentation (API reference, core concepts, getting started, entities, etc.) - Update all specs to work
- Removed `Info::Rest` namespace and consolidated classes under `Info`. - Moved `Builder`, `DSL`, and `Result` from `Rest` to `Info`. - Updated `Base` class to reference the new `Info::DSL` location. - Adjusted specs to reflect namespace changes, including validation of `Info::Result`. - Simplified structure for better clarity and reduced redundancy within the `Info` module.
- Added detailed documentation to `Inventory::Collection` and `Versions::Collection`. - Included purpose, usage, delegated methods, examples, and custom method descriptions for clarity. - Updated comments to align with internal standards for documentation style.
- Added comprehensive documentation for `Executor::Inventory`, including purpose, usage, caching behavior, access patterns, and method examples. - Described dynamic method handling (`method_missing` and `respond_to_missing?`), hash-based access (`to_h`), and debugging representation (`inspect`). - Included private helper method `find_inventory_item` for internal item lookup with error handling. - Ensures clear guidelines for usage and behavior explanation.
- Added comprehensive class-level documentation to `Request::Attribute::Builder`, detailing purpose, usage, inheritance, and DSL example. - Documented key methods (`create_attribute`, `deep_copy_attribute`) with parameters, behavior, and return value explanations. - Updated comments to align with internal documentation standards for clarity and maintainability.
- Added comprehensive class-level documentation for `Request::Validator`, `Factory`, `Entity`, and `Attribute`, detailing their purposes, usage, validation flow, and implementation. - Introduced detailed comments for key methods, providing parameter explanations, expected behaviors, and return value descriptions. - Enhanced the documentation for `Response::Validator`, `Factory`, `Entity`, and `Attribute` to outline differences from their request counterparts and describe response-specific behaviors. - Updated nested attribute handling, default behaviors, and error handling across request/response components per internal documentation standards.
- Added comprehensive documentation for the versioning system, including `Resolver`, `Workspace`, `Request`, `Factory`, `Executor`, and `DSL` components. - Detailed version resolution, validation, and execution logic, including error handling for deprecated or missing versions. - Enhanced documentation for `Execution::Request` to explain supported executor types (Class, String, Proc) and the execution flow. - Documented `Workspace` orchestration for resolving, validating, executing, and building results. - Added detailed comments to align with internal standards, ensuring clarity and maintainability.
- Added detailed documentation for `DSL`, `Callable`, and `Workspace` modules, providing insights into their purpose, usage, architecture, and method chains. - Explained the relationship between class-level `Callable` methods, instance-level `Workspace` methods, and `Versions::Workspace` execution. - Described the `call!` method's flow, including parameter passing, version resolution, and execution delegation. - Aligned comments with internal documentation standards for clarity and maintainability.
- Added detailed documentation for `Inventory::Factory`, `Inventory`, `Result`, and `Entity::Builder`, outlining their purpose, usage, and method-level explanations. - Explained the `Factory`'s `provide` method for defining inventory items with various source types (Symbol, Proc, direct values) and its validation. - Documented `Inventory` lazy evaluation, usage examples, and source validation. - Enhanced commentary for `Result`, including attributes (`data`, `status`, `version`) and debugging support. - Clarified `Entity::Builder` defaults (attributes required by default) and key methods (`create_attribute`, `deep_copy_attribute`). - Standardized comments to meet internal documentation best practices for better readability and maintainability.
- Introduced `Treaty::Action::Base` as the core base class for action definitions. - Added usage examples to demonstrate versioning, request/response structures, and delegation to services. - Documented the purpose and structure of `Treaty::Action` with references to key components. - Included guidance for inheriting and extending the base class, covering versions and execution.
- Standardized type documentation across Treaty components to use full namespace references, ensuring clarity and consistency. - Updated return type annotations for `Factory`, `Collection`, `Attribute`, and `Version` classes to specify their full paths (e.g., `Treaty::Action::Inventory::Collection`). - Enhanced method-level comments in `Entity` and `Action` modules to reflect precise input/output expectations. - Improved code readability and maintainability by aligning with internal annotation best practices.
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.
No description provided.