forked from lthn/blockchain
This 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. ### Highlights * **New API Interface**: Introduced a new API interface using OpenAPI v3 to enable GUI/WEB development to consume chain data without needing custom server applications. * **Build System Enhancements**: Significant updates to the build system, including Makefile, CMake, and Conan configurations, to streamline the build process and support new functionalities. * **Multi-language SDK Generation**: Integrated OpenAPI Generator to automatically create SDKs for various programming languages, including Go, Angular, and PHP, simplifying client-side integration.
49 lines
1.1 KiB
Go
Generated
49 lines
1.1 KiB
Go
Generated
/*
|
|
Lethean Blockchain API
|
|
|
|
Testing InfoUtilsSdkClientGoService
|
|
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
|
|
|
package lthn
|
|
|
|
import (
|
|
"context"
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
"testing"
|
|
openapiclient "github.com/letheanVPN/blockchain/utils/sdk/client/go"
|
|
)
|
|
|
|
func Test_lthn_InfoUtilsSdkClientGoService(t *testing.T) {
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
|
|
t.Run("Test InfoUtilsSdkClientGoService GetInfo", func(t *testing.T) {
|
|
|
|
t.Skip("skip test") // remove to run test
|
|
|
|
resp, httpRes, err := apiClient.InfoUtilsSdkClientGo.GetInfo(context.Background()).Execute()
|
|
|
|
require.Nil(t, err)
|
|
require.NotNil(t, resp)
|
|
assert.Equal(t, 200, httpRes.StatusCode)
|
|
|
|
})
|
|
|
|
t.Run("Test InfoUtilsSdkClientGoService Version", func(t *testing.T) {
|
|
|
|
t.Skip("skip test") // remove to run test
|
|
|
|
resp, httpRes, err := apiClient.InfoUtilsSdkClientGo.Version(context.Background()).Execute()
|
|
|
|
require.Nil(t, err)
|
|
require.NotNil(t, resp)
|
|
assert.Equal(t, 200, httpRes.StatusCode)
|
|
|
|
})
|
|
|
|
}
|