-
Notifications
You must be signed in to change notification settings - Fork 3
New API Interface #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduces a new API module using Oatpp and Oatpp-Swagger, including controllers, DTOs, and server setup. Updates build scripts and dependencies to support the new API layer for Lethean, providing endpoints and Swagger documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new OpenAPI v3 interface for consuming blockchain data, enabling GUI/WEB development without custom server applications. The implementation uses the oatpp framework to provide a REST API with Swagger documentation.
Key changes:
- Added complete API server infrastructure using oatpp framework
- Implemented basic REST endpoints with OpenAPI/Swagger documentation
- Added new dependencies for oatpp and oatpp-swagger libraries
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/api/main.cpp | Main entry point for the API server with server initialization and Swagger setup |
| src/api/dto/DTOs.hpp | Data Transfer Object definitions for API responses |
| src/api/controller/info/InfoController.hpp | Controller for info-related endpoints (version, root) |
| src/api/controller/RootController.hpp | Root controller with hello world endpoint |
| src/api/CMakeLists.txt | Build configuration for the API module |
| src/api/ApiServer.hpp | Server component configuration and dependency injection |
| src/CMakeLists.txt | Updated to include the new API subdirectory |
| docs | Updated documentation subproject commit |
| conanfile.py | Added oatpp and oatpp-swagger dependencies |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Simplified and modernized the README to focus on Makefile-based build and packaging workflow. Removed outdated manual steps for Linux, Windows, and macOS, and added concise instructions for cloning, building, and customizing builds using Makefile variables. Updated Discord badge and removed legacy information.
Improved documentation for build customization, added examples for using Makefile variables, clarified release packaging output directory, and included instructions for cleaning the build directory. Also updated formatting for better readability.
Updated the README to clarify proper cleaning procedures for the build directory, emphasizing the use of 'make clean' and consequences of manual deletion. Modified the Makefile so 'clean-build' now depends on 'clean' for a more thorough cleanup. Updated docs submodule to latest commit.
Expanded build instructions to clarify required tools and dependency handling. Added context about historical distribution methods and CPack usage for packaging. Provided guidance on skipping the packing step and removed redundant custom build section.
Added Web2 and Web3 gateway links and domain information to the README. Fixed a typo in the word 'packages' in the CPack section.
Renamed 'GetConan.cmake' to 'ConanGet.cmake' and 'conan_provider.cmake' to 'ConanProvider.cmake' for consistent naming. Updated references in CMakePresets.json, Makefile, and related CMake scripts to reflect these changes.
Moved static assert test and Dockerfile to new locations for better organization. Renamed several JSON config files. Removed unused resource files, shell scripts, desktop entries, and utility scripts from the utils and resources directories. Updated CMakeLists.txt and docker-compose.yml to reflect new file paths.
Deleted the configure_file invocation for Directory.Build.props in the MSVC-specific section of CMakeLists.txt, that forced job settings overriding build system settings.
Added a project introduction, description of features, and usage terms to the README for better clarity and onboarding.
Replaces RootController and legacy info controller with new InfoController and BlockController, adds DTOs for block and transaction details, and restructures the API server to use modular components. Updates CMakeLists to include new sources and dependencies, and refactors main.cpp to use the new ApiServer entry point. Improves Swagger documentation and endpoint organization for better maintainability and extensibility.
…nfigurations in CMakeLists.txt
…ditional API enablement
…ization in ApiServer
performance and chain statistics
Added linguist-generated attribute for SDK clients in .gitattributes to hide them in GitHub diffs. Enhanced utils/sdk/Makefile with target-specific hooks, improved ignore file handling, and refined Go client build steps. Updated Go SDK config to use 'lthn' as package name and set isGoSubmodule property.
Expanded the OpenAPI specification to include new endpoints, updated server URLs, and revised schema definitions for improved clarity and coverage. The API description was updated and several new models and parameters were added to support additional blockchain and daemon functionality.
Introduces a generated Go SDK client for the Lethean Blockchain API, including OpenAPI spec, models, API interfaces, documentation, and tests. This enables Go applications to interact with Lethean blockchain endpoints for block, info, and transaction operations.
Introduces a new PHP client SDK generated via OpenAPI for the Lethean blockchain, including source code, models, API classes, documentation, tests, and configuration files. Updates Makefile to support PHP SDK generation and modifies php.json package configuration.
Introduces a new Angular client SDK for the Lethean Blockchain API, generated via OpenAPI Generator. Includes all necessary Angular service, model, configuration, and packaging files, and updates the Makefile to support the 'angular' target for SDK generation.
Introduces a new Python client SDK for the lthn API, generated via OpenAPI Generator. Includes source code, models, API classes, documentation, tests, CI/CD workflows for GitHub and GitLab, and project configuration files.
Enhances the Go SDK Makefile target to fix import paths in generated files and sets the correct Go module path. Updates go.json to use 'utils/sdk/client/go' for package, API, and model paths, and adds additional OpenAPI generator properties.
Renamed Go SDK API services and documentation from BlockAPI/InfoAPI to BlockUtilsSdkClientGo/InfoUtilsSdkClientGo for consistency. Updated all references, method receivers, and usage examples accordingly. Added new Java SDK client, models, API, documentation, and build files under utils/sdk/client/java. Updated Go module dependencies and added go.sum. Enhanced Go models to support additional properties in JSON unmarshalling.
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 151 out of 570 changed files in this pull request and generated 6 comments.
Files not reviewed (6)
- .idea/cmake.xml: Language not supported
- .idea/copyright/LTHN.xml: Language not supported
- .idea/copyright/profiles_settings.xml: Language not supported
- .idea/editor.xml: Language not supported
- .idea/jsonSchemas.xml: Language not supported
- .idea/scopes/apiserver.xml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This is an excellent and substantial pull request that introduces a modern OpenAPI-based REST API for the daemon, which will significantly improve the developer experience for anyone building applications on top of the Lethean blockchain. The use of oatpp for the server and openapi-generator for client SDKs is a great choice. The refactoring of the build system with Makefile and Conan presets, along with the much-improved README.md, makes the project much more accessible. I have a few points of feedback, including one critical security issue regarding hardcoded credentials that must be addressed. Other comments are aimed at improving the robustness and portability of the build system and configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 152 out of 571 changed files in this pull request and generated no new comments.
Files not reviewed (6)
- .idea/cmake.xml: Language not supported
- .idea/copyright/LTHN.xml: Language not supported
- .idea/copyright/profiles_settings.xml: Language not supported
- .idea/editor.xml: Language not supported
- .idea/jsonSchemas.xml: Language not supported
- .idea/scopes/apiserver.xml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
/gemini summary |
Summary of ChangesThis pull request introduces a comprehensive new API interface for the blockchain, leveraging OpenAPI v3 to facilitate direct consumption of chain data by GUI and web applications. This change significantly refines the project's build infrastructure, incorporating Conan for dependency management and CMake for configuration, alongside the integration of an OpenAPI Generator to produce SDKs for multiple languages. Additionally, a new framework for AI agent collaboration has been established to guide automated contributions. Highlights
Changelog
Ignored Files
Activity
|
Includes OpenAPI v3 to consume chain data for GUI/WEB development without purpose-built custom server applications.