diff --git a/README.md b/README.md index c0aa2c7..0c34b90 100644 --- a/README.md +++ b/README.md @@ -350,6 +350,11 @@ Authentication schemes defined for the API: - **Location**: URL query string +## Documentation for sealed results + +- [Sealed](docs/Sealed.md) +- [DecryptionKey](docs/DecryptionKey.md) + ## Recommendation It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. diff --git a/docs/DecryptionKey.md b/docs/DecryptionKey.md new file mode 100644 index 0000000..8964bb7 --- /dev/null +++ b/docs/DecryptionKey.md @@ -0,0 +1,10 @@ +# DecryptionKey + +## Properties + +| Name | Type | Description | Notes | +|---------------|---------------|-----------------------------------------------------------------------------------|-------| +| **Key** | **byte[]** | Key generated in dashboard that will be used to decrypt sealed result | | +| **Algorithm** | **Algorithm** | Algorithm to use for decryption. Currently only "aes-256-gcm" value is supported. | | + + diff --git a/docs/Sealed.md b/docs/Sealed.md new file mode 100644 index 0000000..2123ca0 --- /dev/null +++ b/docs/Sealed.md @@ -0,0 +1,12 @@ +# Sealed + +## **UnsealEventsResponse** +> EventResponse unsealEventResponse(sealed []byte, keys []DecryptionKey) + +Decrypts the sealed response with provided keys. +### Required Parameters + +| Name | Type | Description | Notes | +|------------|---------------------|------------------------------------------------------------------------------------------|-------| +| **sealed** | **byte[]** | Base64 encoded sealed data | | +| **keys** | **DecryptionKey[]** | Decryption keys. The SDK will try to decrypt the result with each key until it succeeds. | | diff --git a/scripts/generate.sh b/scripts/generate.sh index 54a4ffa..1e01de1 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -24,7 +24,8 @@ echo "VERSION: $VERSION" sed -i "s/artifactVersion: .*/artifactVersion: $VERSION/g" config.yaml sed -i "s/^VERSION=.*/VERSION='$VERSION'/g" ./scripts/generate.sh -rm -f pom.xml README.md build.gradle settings.gradle gradle.properties ./docs/* ./src/main/java/com/fingerprint/model/* +rm -f pom.xml README.md build.gradle settings.gradle gradle.properties ./src/main/java/com/fingerprint/model/* +find ./docs -type f ! -name "DecryptionKey.md" ! -name "Sealed.md" -exec rm {} + java -jar ./bin/generator.jar generate -c config.yaml -g java --library jersey2 -i res/fingerprint-server-api.yaml --skip-validate-spec -o . -t template diff --git a/template/README.mustache b/template/README.mustache index e35bbb0..026d01f 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -282,6 +282,11 @@ Class | Method | HTTP request | Description {{/authMethods}} +## Documentation for sealed results + +- [Sealed](docs/Sealed.md) +- [DecryptionKey](docs/DecryptionKey.md) + ## Recommendation It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.