Skip to content
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

feat(plugin-keychain-memory): add REST API endpoint implementations #2893

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
238 changes: 113 additions & 125 deletions packages/cactus-plugin-keychain-memory/src/main/json/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.0.3",
"info": {
"title": "Hyperledger Cactus Plugin - Keychain Memory ",
"description": "Contains/describes the Hyperledger Cactus Keychain Memory plugin.",
"description": "Contains/describes the Hyperledger Cacti Keychain Memory plugin.",
"version": "v2.0.0-alpha.2",
"license": {
"name": "Apache-2.0",
Expand All @@ -11,148 +11,136 @@
},
"components": {
"schemas": {
"GetKeychainEntryRequest": {
"type": "object",
"required": ["key"],
"additionalProperties": false,
"properties": {
"key": {
"type": "string",
"description": "The key for the entry to get from the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
"PrometheusExporterMetricsResponse": {
"type": "string",
"nullable": false
}
}
},
"paths": {
"/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry": {
"post": {
"x-hyperledger-cacti": {
"http": {
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry",
"verbLowerCase": "post"
}
}
},
"GetKeychainEntryResponse": {
"type": "object",
"required": ["key", "value"],
"properties": {
"key": {
"type": "string",
"description": "The key that was used to retrieve the value from the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
},
"operationId": "getKeychainEntryV1",
"summary": "Retrieves the contents of a keychain entry from the backend.",
"parameters": [],
"requestBody": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body"
outSH marked this conversation as resolved.
Show resolved Hide resolved
},
"responses": {
"200": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200"
},
"value": {
"type": "string",
"description": "The value associated with the requested key on the keychain.",
"minLength": 0,
"maxLength": 10485760,
"nullable": false
}
}
},
"SetKeychainEntryRequest": {
"type": "object",
"required": ["key", "value"],
"additionalProperties": false,
"properties": {
"key": {
"type": "string",
"description": "The key for the entry to set on the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
"400": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400"
},
"value": {
"type": "string",
"description": "The value that will be associated with the key on the keychain.",
"minLength": 0,
"maxLength": 10485760,
"nullable": false
"401": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401"
},
"404": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404"
},
"500": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500"
}
}
},
"SetKeychainEntryResponse": {
"type": "object",
"required": ["key"],
"properties": {
"key": {
"type": "string",
"description": "The key that was used to set the value on the keychain.",
"minLength": 1,
"maxLength": 1024,
"nullable": false
}
},
"/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry": {
"post": {
"x-hyperledger-cacti": {
"http": {
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry",
"verbLowerCase": "post"
}
},
"operationId": "setKeychainEntryV1",
"summary": "Sets a value under a key on the keychain backend.",
"parameters": [],
"requestBody": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body"
},
"responses": {
"200": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200"
},
"400": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400"
},
"401": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401"
},
"500": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500"
}
}
},
"PrometheusExporterMetricsResponse": {
"type": "string",
"nullable": false
}
},
"requestBodies": {
"keychain_get_entry_request_body": {
"description": "Request body to obtain a keychain entry via its key",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetKeychainEntryRequest"
}
"/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry": {
"post": {
"x-hyperledger-cacti": {
"http": {
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry",
"verbLowerCase": "post"
}
}
},
"keychain_set_entry_request_body": {
"description": "Request body to write/update a keychain entry via its key",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SetKeychainEntryRequest"
}
},
"operationId": "deleteKeychainEntryV1",
"summary": "Deletes an entry under a key on the keychain backend.",
"parameters": [],
"requestBody": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_delete_entry_request_body"
},
"responses": {
"200": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_200"
},
"400": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_400"
},
"401": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_401"
},
"500": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_500"
}
}
}
},
"responses": {
"keychain_get_entry_200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetKeychainEntryResponse"
}
"/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry": {
"post": {
"x-hyperledger-cacti": {
"http": {
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry",
"verbLowerCase": "post"
}
}
},
"keychain_get_entry_400": {
"description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters."
},
"keychain_get_entry_401": {
"description": "Authorization information is missing or invalid."
},
"keychain_get_entry_404": {
"description": "A keychain item with the specified key was not found."
},
"keychain_get_entry_500": {
"description": "Unexpected error."
},
"keychain_set_entry_200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SetKeychainEntryResponse"
}
},
"operationId": "hasKeychainEntryV1",
"summary": "Checks that an entry exists under a key on the keychain backend",
"parameters": [],
"requestBody": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_has_entry_request_body"
},
"responses": {
"200": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_200"
},
"400": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_400"
},
"401": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_401"
},
"500": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_500"
}
}
},
"keychain_set_entry_400": {
"description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters."
},
"keychain_set_entry_401": {
"description": "Authorization information is missing or invalid."
},
"keychain_set_entry_500": {
"description": "Unexpected error."
}
}
},
"paths": {
},
"/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics": {
"get": {
"x-hyperledger-cacti": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ 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/GetKeychainEntryRequest.kt
src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponse.kt
src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequest.kt
src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponse.kt
src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt
src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt
src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt
src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt
src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt
src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt
src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt
src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# org.openapitools.client - Kotlin client library for Hyperledger Cactus Plugin - Keychain Memory

Contains/describes the Hyperledger Cactus Keychain Memory plugin.
Contains/describes the Hyperledger Cacti Keychain Memory plugin.

## 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.
Expand Down Expand Up @@ -44,16 +44,24 @@ All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**deleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry | Deletes an entry under a key on the keychain backend.
*DefaultApi* | [**getKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry | Retrieves the contents of a keychain entry from the backend.
*DefaultApi* | [**getPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics | Get the Prometheus Metrics
*DefaultApi* | [**hasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry | Checks that an entry exists under a key on the keychain backend
*DefaultApi* | [**setKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry | Sets a value under a key on the keychain backend.


<a id="documentation-for-models"></a>
## Documentation for Models

- [org.openapitools.client.models.GetKeychainEntryRequest](docs/GetKeychainEntryRequest.md)
- [org.openapitools.client.models.GetKeychainEntryResponse](docs/GetKeychainEntryResponse.md)
- [org.openapitools.client.models.SetKeychainEntryRequest](docs/SetKeychainEntryRequest.md)
- [org.openapitools.client.models.SetKeychainEntryResponse](docs/SetKeychainEntryResponse.md)
- [org.openapitools.client.models.DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md)
- [org.openapitools.client.models.DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md)
- [org.openapitools.client.models.GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md)
- [org.openapitools.client.models.GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md)
- [org.openapitools.client.models.HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md)
- [org.openapitools.client.models.HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md)
- [org.openapitools.client.models.SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md)
- [org.openapitools.client.models.SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md)


<a id="documentation-for-authorization"></a>
Expand Down
Loading
Loading