main to develop #40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
- Add rust_client.rs module for generating async HTTP clients - Clients connect to OSIS servers via JSON-RPC 2.0 over HTTP(S) - Generate endpoint: {base_url}/{context}/{domain}/rpc - Async CRUD methods: new, get, set, delete, list, exists, find - Token-based authentication with challenge-response support - RPC request/response types with proper error handling - 524 lines of documented, fully functional client generation code - Update generation_demo.rs to demonstrate client code generation - Update mod.rs to export the new generator - Full API summary displayed in demo output - Example client: AppClient with Task and User CRUD operations- Removed parsing-based approach for RPC wrapper generation - Now generates rpc.rs impl blocks directly from schema services and methods - Added generate_service_impl() to create impl blocks from RpcService/RpcMethod - Added rust_type_name() to convert TypeExpr to Rust type strings - rpc.rs now contains ALL method signatures with todo!() stubs ready for implementation - No longer duplicates error types (those stay in rpc_generated.rs) - Custom implementations in rpc.rs are preserved across regenerations - Much cleaner and more maintainable approach - All 355 tests pass File structure: - rpc_generated.rs: Error types only (pure generation) - rpc.rs: All handler impl blocks with todo!() stubs (auto-generated once, then preserved) Example output: impl UserManagerHandler { pub fn new() -> Self { ... } pub fn authenticate(&self, email: String, password: String) -> Result<AuthResult, UserManagerError> { todo!("Implement authenticate") } pub fn change_password(&self, old_password: String, new_password: String) -> Result<bool, UserManagerError> { todo!("Implement change_password") } }Pull request closed