Skip to content

Commit

Permalink
docs: add api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnderScorer committed Jan 25, 2024
1 parent 04986dc commit eafb437
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions docs/DecryptionKey.md
Original file line number Diff line number Diff line change
@@ -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. | |


12 changes: 12 additions & 0 deletions docs/Sealed.md
Original file line number Diff line number Diff line change
@@ -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. | |
3 changes: 2 additions & 1 deletion scripts/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions template/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit eafb437

Please sign in to comment.