feat(docs): architecture diagrams and JSDoc improvements#8
feat(docs): architecture diagrams and JSDoc improvements#8dihannahdi wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
4482b94 to
1a9b703
Compare
|
Thank you for this contribution! We are evaluating the changes and will provide a formal response within 1-2 weeks. |
|
thank you so much for the attentions. id really love to hear whatever it is! |
Updated 'simple_happy_path_client.py' to prepend an HTML comment to the exported markdown log, indicating that the file is automatically generated and should not be modified manually.
BREAKING CHANGE: None
This commit introduces multiple improvements across the UCP codebase:
- fix(generate_schemas): replace .json suffix only when it's actually a suffix
Fixes issue where str.replace('.json') replaced ALL occurrences including
directory names like 'json.schemas/'. Added replace_json_suffix() helper.
- feat(validate_specs): add OpenAPI 3.1 compliance and JSON Schema validation
- Added structured ValidationResult and ValidationIssue classes
- OpenAPI 3.1 structure validation (version, info, paths, webhooks)
- JSON Schema structure validation (, , naming conventions)
- Command-line arguments for --verbose, --continue, --openapi-only
- feat(main): add structured logging and improved error handling
- Added SchemaLoadError, SchemaReferenceError, OperationNotFoundError
- Added _format_error() and _safe_load_json() helpers
- Type hints and comprehensive docstrings for all macros
- Better error messages with context for debugging
- feat(docs): add interactive architecture diagrams with Mermaid
- Protocol overview diagram showing UCP components
- Checkout flow sequence diagram
- Capability & extension architecture
- Payment handler data flow
- Schema composition visualization
- Checkout lifecycle state machine
- docs(generate_ts_schema_types): add comprehensive JSDoc comments
- File-level documentation with usage instructions
- Function-level JSDoc with @param and @returns
- Refactored for better code organization
- test(schema_utils): add comprehensive unit test suite
- TestColors: ANSI color constant tests
- TestResolveRefPath: JSON pointer resolution tests
- TestLoadJson: File loading tests
- TestResolveInternalRef: Internal reference tests
- TestMergeSchemas: Schema merging tests
- TestResolveSchema: Schema resolution tests
- TestJsonSuffixReplacement: New suffix replacement tests
Signed-off-by: Contributor
1a9b703 to
44aa4a4
Compare
Rebase & Conflict Resolution UpdateThis PR has been rebased onto the latest What changed:
What remains (4 files, +509/-66):
PR title and description updated to reflect the reduced scope. |
Summary
This PR introduces documentation and code quality improvements for the UCP codebase.
Features
Documentation
Files Changed
docs/documentation/architecture-diagrams.mdgenerate_ts_schema_types.jsmkdocs.ymltests/__init__.pyChanges Dropped (due to upstream restructuring)
The following changes from the original PR were dropped because upstream deleted the target files in #125 (replaced by ucp-schema CLI):
generate_schemas.py- bug fix + replace_json_suffix() helpervalidate_specs.py- OpenAPI 3.1 and JSON Schema validationmain.py- logging, error handling, type hints (upstream restructured entirely)tests/test_schema_utils.py- unit tests for deleted schema_utils.pyTesting
Checklist
This contribution follows the guidelines in CONTRIBUTING.md and GOVERNANCE.md