forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bungee): Add skeleton for BUNGEE
Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt>
- Loading branch information
1 parent
734fcbd
commit 62a4886
Showing
86 changed files
with
9,675 additions
and
65 deletions.
There are no files selected for viewing
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", | ||
"spaces": 2, | ||
"generator-cli": { | ||
"version": "6.6.0" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"name": "@hyperledger/cactus-plugin-bungee", | ||
"version": "1.0.0", | ||
"description": "Proof of concept of bungee", | ||
"keywords": [ | ||
"Hyperledger", | ||
"Cactus", | ||
"Integration", | ||
"Blockchain", | ||
"Distributed Ledger Technology", | ||
"View" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/hyperledger/cacti.git" | ||
}, | ||
"license": "Apache-2.0", | ||
"author": { | ||
"name": "Hyperledger Cactus Contributors", | ||
"email": "cactus@lists.hyperledger.org", | ||
"url": "https://www.hyperledger.org/use/cacti" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Afonso Marques", | ||
"email": "Afonso.m.marques@tecnico.ulisboa.pt", | ||
"url": "https://github.com/WAfonsoMarques" | ||
}, | ||
{ | ||
"name": "Rafael Belchior", | ||
"email": "rafael.belchior@tecnico.ulisboa.pt", | ||
"url": "https://rafaelapb.github.io/" | ||
}, | ||
{ | ||
"name": "André Augusto", | ||
"email": "andre.augusto@tecnico.ulisboa.pt", | ||
"url": "https://github.com/AndreAugusto11" | ||
} | ||
], | ||
"main": "dist/lib/main/typescript/index.js", | ||
"module": "dist/lib/main/typescript/index.js", | ||
"types": "dist/lib/main/typescript/index.d.ts", | ||
"files": [ | ||
"dist/*" | ||
], | ||
"scripts": { | ||
"codegen": "run-p 'codegen:*'", | ||
"codegen:openapi": "npm run generate-sdk", | ||
"generate-sdk": "run-p 'generate-sdk:*'", | ||
"generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", | ||
"generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", | ||
"pretsc": "npm run generate-sdk", | ||
"tsc": "tsc --project ./tsconfig.json", | ||
"watch": "npm-watch" | ||
}, | ||
"dependencies": { | ||
"@hyperledger/cactus-cmd-api-server": "2.0.0-alpha.2", | ||
"@hyperledger/cactus-common": "2.0.0-alpha.2", | ||
"@hyperledger/cactus-core": "2.0.0-alpha.2", | ||
"@hyperledger/cactus-core-api": "2.0.0-alpha.2", | ||
"@hyperledger/cactus-plugin-keychain-memory": "2.0.0-alpha.2", | ||
"@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0-alpha.2", | ||
"@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0-alpha.2", | ||
"@hyperledger/cactus-plugin-object-store-ipfs": "2.0.0-alpha.2", | ||
"@hyperledger/cactus-test-tooling": "2.0.0-alpha.2", | ||
"axios": "1.6.0", | ||
"typescript-optional": "2.0.1", | ||
"uuid": "9.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/body-parser": "1.19.4", | ||
"@types/crypto-js": "4.0.1", | ||
"@types/express": "4.17.19", | ||
"@types/fs-extra": "11.0.3", | ||
"@types/tape": "4.13.4", | ||
"@types/uuid": "9.0.6", | ||
"express": "4.18.2" | ||
}, | ||
"engines": { | ||
"node": ">=18", | ||
"npm": ">=8" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"watch": { | ||
"tsc": { | ||
"patterns": [ | ||
"src/", | ||
"src/*/json/**/openapi*" | ||
], | ||
"ignore": [ | ||
"src/**/generated/*" | ||
], | ||
"extensions": [ | ||
"ts", | ||
"json" | ||
], | ||
"quiet": true, | ||
"verbose": false, | ||
"runOnChangeOnly": true | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "Hyperledger Cactus Plugin - BUNGEE", | ||
"description": "Can create blockchain views of a fabric ledger", | ||
"version": "0.0.1", | ||
"license": { | ||
"name": "Apache 2.0", | ||
"url": "https://www.apache.org/licenses/LICENSE-2.0.html" | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"CreateViewRequest":{ | ||
"type":"object", | ||
"properties": { | ||
"x":{ | ||
"type":"string" | ||
} | ||
} | ||
}, | ||
"CreateViewResponse":{ | ||
"type":"object", | ||
"properties": { | ||
"y":{ | ||
"type":"string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"paths": { | ||
"/api/v1/plugins/@hyperledger/cactus-plugin-bungee/create-view": { | ||
"post": { | ||
"x-hyperledger-cacti": { | ||
"http": { | ||
"verbLowerCase": "post", | ||
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee/create-view" | ||
} | ||
}, | ||
"operationId": "createViewV1", | ||
"summary": "Creates a Blockchain View.", | ||
"description": "", | ||
"parameters": [], | ||
"requestBody": { | ||
"required": true, | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/CreateViewRequest" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/CreateViewResponse" | ||
} | ||
} | ||
} | ||
}, | ||
"404": { | ||
"description": "" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...us-plugin-bungee/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
README.md | ||
build.gradle | ||
gradlew | ||
gradlew.bat | ||
settings.gradle | ||
src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt | ||
src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt | ||
src/main/kotlin/org/openapitools/client/models/CreateViewRequest.kt | ||
src/main/kotlin/org/openapitools/client/models/CreateViewResponse.kt |
1 change: 1 addition & 0 deletions
1
...-plugin-bungee/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
6.6.0 |
61 changes: 61 additions & 0 deletions
61
.../cactus-plugin-bungee/src/main/kotlin/generated/openapi/kotlin-client/README.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# org.openapitools.client - Kotlin client library for Hyperledger Cactus Plugin - BUNGEE | ||
|
||
Can create blockchain views of a fabric ledger | ||
|
||
## Overview | ||
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. | ||
|
||
- API version: 0.0.1 | ||
- Package version: | ||
- Build package: org.openapitools.codegen.languages.KotlinClientCodegen | ||
|
||
## Requires | ||
|
||
* Kotlin 1.7.21 | ||
* Gradle 7.5 | ||
|
||
## Build | ||
|
||
First, create the gradle wrapper script: | ||
|
||
``` | ||
gradle wrapper | ||
``` | ||
|
||
Then, run: | ||
|
||
``` | ||
./gradlew check assemble | ||
``` | ||
|
||
This runs all tests and packages the library. | ||
|
||
## Features/Implementation Notes | ||
|
||
* Supports JSON inputs/outputs, File inputs, and Form inputs. | ||
* Supports collection formats for query parameters: csv, tsv, ssv, pipes. | ||
* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. | ||
* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. | ||
|
||
<a id="documentation-for-api-endpoints"></a> | ||
## Documentation for API Endpoints | ||
|
||
All URIs are relative to *http://localhost* | ||
|
||
Class | Method | HTTP request | Description | ||
------------ | ------------- | ------------- | ------------- | ||
*DefaultApi* | [**createViewV1**](docs/DefaultApi.md#createviewv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-bungee/create-view | Creates a Blockchain View. | ||
|
||
|
||
<a id="documentation-for-models"></a> | ||
## Documentation for Models | ||
|
||
- [org.openapitools.client.models.CreateViewRequest](docs/CreateViewRequest.md) | ||
- [org.openapitools.client.models.CreateViewResponse](docs/CreateViewResponse.md) | ||
|
||
|
||
<a id="documentation-for-authorization"></a> | ||
## Documentation for Authorization | ||
|
||
Endpoints do not require authorization. | ||
|
38 changes: 38 additions & 0 deletions
38
packages/cactus-plugin-bungee/src/main/kotlin/generated/openapi/kotlin-client/build.gradle
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
group 'org.openapitools' | ||
version '1.0.0' | ||
|
||
wrapper { | ||
gradleVersion = '7.5' | ||
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" | ||
} | ||
|
||
buildscript { | ||
ext.kotlin_version = '1.7.21' | ||
|
||
repositories { | ||
maven { url "https://repo1.maven.org/maven2" } | ||
} | ||
dependencies { | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
} | ||
} | ||
|
||
apply plugin: 'kotlin' | ||
apply plugin: 'maven-publish' | ||
|
||
repositories { | ||
maven { url "https://repo1.maven.org/maven2" } | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" | ||
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" | ||
implementation "com.squareup.moshi:moshi-kotlin:1.13.0" | ||
implementation "com.squareup.moshi:moshi-adapters:1.13.0" | ||
implementation "com.squareup.okhttp3:okhttp:4.10.0" | ||
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" | ||
} |
Oops, something went wrong.