From 49ddb9a5940ae8a454e34ad023bfc035a0a05619 Mon Sep 17 00:00:00 2001 From: Julia Pampus <72392527+juliapampus@users.noreply.github.com> Date: Tue, 8 Nov 2022 14:13:54 +0100 Subject: [PATCH] chore(build): change groupId to org.eclipse.edc (#2154) * chore(build): update groupId * chore(build): change metamodel version to 0.0.1-SNAPSHOT * chore: update OpenApi files --- build.gradle.kts | 10 +- docs/swaggerui/swagger-spec.js | 1125 +++++++++++++++-- .../provision/provision-oauth2/README.md | 2 +- gradle.properties | 4 +- resources/openapi/openapi.yaml | 930 +++++++++++--- resources/openapi/yaml/api-observability.yaml | 102 ++ resources/openapi/yaml/asset-api.yaml | 337 +++++ resources/openapi/yaml/catalog-api.yaml | 336 +++++ ...t-api.yaml => contract-agreement-api.yaml} | 71 ++ ...-api.yaml => contract-definition-api.yaml} | 47 + ...api.yaml => contract-negotiation-api.yaml} | 106 ++ resources/openapi/yaml/control-plane-api.yaml | 84 ++ resources/openapi/yaml/data-plane-api.yaml | 156 +++ .../openapi/yaml/data-plane-selector-api.yaml | 96 ++ .../yaml/data-plane-transfer-sync.yaml | 35 + .../openapi/yaml/federated-catalog-core.yaml | 240 ++++ ...on-api.yaml => policy-definition-api.yaml} | 77 ++ resources/openapi/yaml/provision-http.yaml | 101 ++ resources/openapi/yaml/provision-oauth2.yaml | 1 + ...ess-api.yaml => transfer-process-api.yaml} | 75 ++ 20 files changed, 3656 insertions(+), 279 deletions(-) create mode 100644 resources/openapi/yaml/api-observability.yaml rename resources/openapi/yaml/{contractagreement-api.yaml => contract-agreement-api.yaml} (80%) rename resources/openapi/yaml/{contractdefinition-api.yaml => contract-definition-api.yaml} (86%) rename resources/openapi/yaml/{contractnegotiation-api.yaml => contract-negotiation-api.yaml} (85%) create mode 100644 resources/openapi/yaml/data-plane-selector-api.yaml rename resources/openapi/yaml/{policydefinition-api.yaml => policy-definition-api.yaml} (83%) create mode 100644 resources/openapi/yaml/provision-http.yaml create mode 100644 resources/openapi/yaml/provision-oauth2.yaml rename resources/openapi/yaml/{transferprocess-api.yaml => transfer-process-api.yaml} (85%) diff --git a/build.gradle.kts b/build.gradle.kts index 45e601260f4..2a56592c481 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,7 +21,7 @@ plugins { jacoco signing id("com.rameshkp.openapi-merger-gradle-plugin") version "1.0.4" - id("org.eclipse.dataspaceconnector.module-names") version "0.0.1-SNAPSHOT" + id("org.eclipse.edc.module-names") version "0.0.1-SNAPSHOT" id("com.autonomousapps.dependency-analysis") version "1.13.1" apply (false) id("org.gradle.crypto.checksum") version "1.4.0" id("io.github.gradle-nexus.publish-plugin") version "1.1.0" @@ -117,8 +117,8 @@ buildscript { val edcGradlePluginsVersion: String by project classpath("io.swagger.core.v3:swagger-gradle-plugin:${swagger}") - classpath("org.eclipse.dataspaceconnector.autodoc:org.eclipse.dataspaceconnector.autodoc.gradle.plugin:${edcGradlePluginsVersion}") - classpath("org.eclipse.dataspaceconnector.test-summary:org.eclipse.dataspaceconnector.test-summary.gradle.plugin:${edcGradlePluginsVersion}") + classpath("org.eclipse.edc.autodoc:org.eclipse.edc.autodoc.gradle.plugin:${edcGradlePluginsVersion}") + classpath("org.eclipse.edc.test-summary:org.eclipse.edc.test-summary.gradle.plugin:${edcGradlePluginsVersion}") } } @@ -140,7 +140,7 @@ allprojects { apply(plugin = "${groupId}.autodoc") // configure which version of the annotation processor to use. defaults to the same version as the plugin - configure { + configure { processorVersion.set(annotationProcessorVersion) outputDirectory.set(project.buildDir) } @@ -257,7 +257,7 @@ allprojects { prettyPrint = true classpath = java.sourceSets["main"].runtimeClasspath buildClasspath = classpath - resourcePackages = setOf("org.eclipse.dataspaceconnector") + resourcePackages = setOf("org.eclipse.edc") outputDir = file("${rootProject.projectDir.path}/resources/openapi/yaml") } configurations { diff --git a/docs/swaggerui/swagger-spec.js b/docs/swaggerui/swagger-spec.js index 72758cb72ef..ec833d7c931 100644 --- a/docs/swaggerui/swagger-spec.js +++ b/docs/swaggerui/swagger-spec.js @@ -12,7 +12,496 @@ window.swaggerSpec={ "servers" : [ { "url" : "/" } ], + "tags" : [ { + "name" : "Data Plane control API", + "description" : "Api targeted by the Control Plane to delegate a data transfer (Provider Push or Streaming) to the Data Plane after the contract has been successfully negotiated and agreed between the two participants. " + }, { + "name" : "Data Plane public API", + "description" : "The public API of the Data Plane is a data proxy enabling a data consumer to actively querydata from the provider data source (e.g. backend Rest API, internal database...) through its Data Planeinstance. Thus the Data Plane is the only entry/output door for the data, which avoids the provider to exposedirectly its data externally.The Data Plane public API being a proxy, it supports all verbs (i.e. GET, POST, PUT, PATCH, DELETE), whichcan then conveyed until the data source is required. This is especially useful when the actual data sourceis a Rest API itself.In the same manner, any set of arbitrary query parameters, path parameters and request body are supported (in the limits fixed by the HTTP server) and can also conveyed to the actual data source." + } ], "paths" : { + "/check/health" : { + "get" : { + "tags" : [ "Application Observability" ], + "description" : "Performs a liveness probe to determine whether the runtime is working properly.", + "operationId" : "checkHealth", + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/HealthStatus" + } + } + } + } + } + } + } + }, + "/check/liveness" : { + "get" : { + "tags" : [ "Application Observability" ], + "description" : "Performs a liveness probe to determine whether the runtime is working properly.", + "operationId" : "getLiveness", + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/HealthStatus" + } + } + } + } + } + } + } + }, + "/check/readiness" : { + "get" : { + "tags" : [ "Application Observability" ], + "description" : "Performs a readiness probe to determine whether the runtime is able to accept requests.", + "operationId" : "getReadiness", + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/HealthStatus" + } + } + } + } + } + } + } + }, + "/check/startup" : { + "get" : { + "tags" : [ "Application Observability" ], + "description" : "Performs a startup probe to determine whether the runtime has completed startup.", + "operationId" : "getStartup", + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/HealthStatus" + } + } + } + } + } + } + } + }, + "/assets" : { + "get" : { + "tags" : [ "Asset" ], + "description" : "Gets all assets according to a particular query", + "operationId" : "getAllAssets", + "parameters" : [ { + "name" : "offset", + "in" : "query", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "limit", + "in" : "query", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "filter", + "in" : "query", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "sort", + "in" : "query", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "enum" : [ "ASC", "DESC" ] + } + }, { + "name" : "sortField", + "in" : "query", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AssetResponseDto" + } + } + } + } + }, + "400" : { + "description" : "Request body was malformed", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ApiErrorDetail" + } + } + } + } + } + }, + "deprecated" : true + }, + "post" : { + "tags" : [ "Asset" ], + "description" : "Creates a new asset together with a data address", + "operationId" : "createAsset", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AssetEntryDto" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Asset was created successfully. Returns the asset Id and created timestamp", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/IdResponseDto" + } + } + } + }, + "400" : { + "description" : "Request body was malformed", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ApiErrorDetail" + } + } + } + } + }, + "409" : { + "description" : "Could not create asset, because an asset with that ID already exists", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ApiErrorDetail" + } + } + } + } + } + } + } + }, + "/assets/request" : { + "post" : { + "tags" : [ "Asset" ], + "description" : " all assets according to a particular query", + "operationId" : "requestAssets", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/QuerySpecDto" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AssetResponseDto" + } + } + } + } + }, + "400" : { + "description" : "Request body was malformed", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ApiErrorDetail" + } + } + } + } + } + } + } + }, + "/assets/{id}" : { + "get" : { + "tags" : [ "Asset" ], + "description" : "Gets an asset with the given ID", + "operationId" : "getAsset", + "parameters" : [ { + "name" : "id", + "in" : "path", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "The asset", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AssetResponseDto" + } + } + } + }, + "400" : { + "description" : "Request was malformed, e.g. id was null", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ApiErrorDetail" + } + } + } + } + }, + "404" : { + "description" : "An asset with the given ID does not exist", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ApiErrorDetail" + } + } + } + } + } + } + }, + "delete" : { + "tags" : [ "Asset" ], + "description" : "Removes an asset with the given ID if possible. Deleting an asset is only possible if that asset is not yet referenced by a contract agreement, in which case an error is returned. DANGER ZONE: Note that deleting assets can have unexpected results, especially for contract offers that have been sent out or ongoing or contract negotiations.", + "operationId" : "removeAsset", + "parameters" : [ { + "name" : "id", + "in" : "path", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "Asset was deleted successfully" + }, + "400" : { + "description" : "Request was malformed, e.g. id was null", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ApiErrorDetail" + } + } + } + } + }, + "404" : { + "description" : "An asset with the given ID does not exist", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ApiErrorDetail" + } + } + } + } + }, + "409" : { + "description" : "The asset cannot be deleted, because it is referenced by a contract agreement", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ApiErrorDetail" + } + } + } + } + } + } + } + }, + "/catalog" : { + "get" : { + "tags" : [ "Catalog" ], + "operationId" : "getCatalog", + "parameters" : [ { + "name" : "providerUrl", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "offset", + "in" : "query", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "limit", + "in" : "query", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "filter", + "in" : "query", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "sort", + "in" : "query", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "enum" : [ "ASC", "DESC" ] + } + }, { + "name" : "sortField", + "in" : "query", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "default" : { + "description" : "Gets contract offers (=catalog) of a single connector", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Catalog" + } + } + } + } + }, + "deprecated" : true + } + }, + "/catalog/request" : { + "post" : { + "tags" : [ "Catalog" ], + "operationId" : "requestCatalog", + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/CatalogRequestDto" + } + } + }, + "required" : true + }, + "responses" : { + "default" : { + "description" : "Gets contract offers (=catalog) of a single connector", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Catalog" + } + } + } + } + } + } + }, "/contractagreements" : { "get" : { "tags" : [ "Contract Agreement" ], @@ -920,10 +1409,43 @@ window.swaggerSpec={ } } }, - "/callback/{processId}/deprovision" : { + "/transferprocess/{processId}/complete" : { "post" : { - "tags" : [ "HTTP Provisioner Webhook" ], - "operationId" : "callDeprovisionWebhook", + "tags" : [ "Transfer Process Control Api" ], + "description" : "Requests completion of the transfer process. Due to the asynchronous nature of transfers, a successful response only indicates that the request was successfully received", + "operationId" : "complete", + "parameters" : [ { + "name" : "processId", + "in" : "path", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "description" : "Request was malformed, e.g. id was null", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ApiErrorDetail" + } + } + } + } + } + } + } + }, + "/transferprocess/{processId}/fail" : { + "post" : { + "tags" : [ "Transfer Process Control Api" ], + "description" : "Requests completion of the transfer process. Due to the asynchronous nature of transfers, a successful response only indicates that the request was successfully received", + "operationId" : "fail", "parameters" : [ { "name" : "processId", "in" : "path", @@ -938,25 +1460,58 @@ window.swaggerSpec={ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/DeprovisionedResource" + "$ref" : "#/components/schemas/TransferProcessFailStateDto" } } - } + }, + "required" : true }, "responses" : { - "default" : { - "description" : "default response", + "400" : { + "description" : "Request was malformed, e.g. id was null", "content" : { - "application/json" : { } + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ApiErrorDetail" + } + } + } } } } } }, - "/callback/{processId}/provision" : { + "/transfer" : { "post" : { - "tags" : [ "HTTP Provisioner Webhook" ], - "operationId" : "callProvisionWebhook", + "tags" : [ "Data Plane control API" ], + "description" : "Initiates a data transfer for the given request. The transfer will be performed asynchronously.", + "operationId" : "initiateTransfer", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DataFlowRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Data transfer initiated" + }, + "400" : { + "description" : "Failed to validate request" + } + } + } + }, + "/transfer/{processId}" : { + "get" : { + "tags" : [ "Data Plane control API" ], + "description" : "Get the current state of a data transfer.", + "operationId" : "getTransferState", "parameters" : [ { "name" : "processId", "in" : "path", @@ -967,11 +1522,123 @@ window.swaggerSpec={ "type" : "string" } } ], + "responses" : { + "200" : { + "description" : "Missing access token" + } + } + } + }, + "/{any}" : { + "get" : { + "tags" : [ "Data Plane public API" ], + "description" : "Send `GET` data query to the Data Plane.", + "operationId" : "get", + "responses" : { + "400" : { + "description" : "Missing access token" + }, + "403" : { + "description" : "Access token is expired or invalid" + }, + "500" : { + "description" : "Failed to transfer data" + } + } + }, + "put" : { + "tags" : [ "Data Plane public API" ], + "description" : "Send `PUT` data query to the Data Plane.", + "operationId" : "put", + "responses" : { + "400" : { + "description" : "Missing access token" + }, + "403" : { + "description" : "Access token is expired or invalid" + }, + "500" : { + "description" : "Failed to transfer data" + } + } + }, + "post" : { + "tags" : [ "Data Plane public API" ], + "description" : "Send `POST` data query to the Data Plane.", + "operationId" : "post", + "responses" : { + "400" : { + "description" : "Missing access token" + }, + "403" : { + "description" : "Access token is expired or invalid" + }, + "500" : { + "description" : "Failed to transfer data" + } + } + }, + "delete" : { + "tags" : [ "Data Plane public API" ], + "description" : "Send `DELETE` data query to the Data Plane.", + "operationId" : "delete", + "responses" : { + "400" : { + "description" : "Missing access token" + }, + "403" : { + "description" : "Access token is expired or invalid" + }, + "500" : { + "description" : "Failed to transfer data" + } + } + }, + "patch" : { + "tags" : [ "Data Plane public API" ], + "description" : "Send `PATCH` data query to the Data Plane.", + "operationId" : "patch", + "responses" : { + "400" : { + "description" : "Missing access token" + }, + "403" : { + "description" : "Access token is expired or invalid" + }, + "500" : { + "description" : "Failed to transfer data" + } + } + } + }, + "/instances" : { + "get" : { + "tags" : [ "Dataplane Selector" ], + "operationId" : "getAll", + "responses" : { + "default" : { + "description" : "default response", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/DataPlaneInstance" + } + } + } + } + } + } + }, + "post" : { + "tags" : [ "Dataplane Selector" ], + "operationId" : "addEntry", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ProvisionerWebhookRequest" + "$ref" : "#/components/schemas/DataPlaneInstance" } } } @@ -986,20 +1653,26 @@ window.swaggerSpec={ } } }, - "/check/health" : { - "get" : { - "tags" : [ "Application Observability" ], - "description" : "Performs a liveness probe to determine whether the runtime is working properly.", - "operationId" : "checkHealth", + "/instances/select" : { + "post" : { + "tags" : [ "Dataplane Selector" ], + "operationId" : "find", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SelectionRequest" + } + } + } + }, "responses" : { - "200" : { + "default" : { + "description" : "default response", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/HealthStatus" - } + "$ref" : "#/components/schemas/DataPlaneInstance" } } } @@ -1007,19 +1680,55 @@ window.swaggerSpec={ } } }, - "/check/liveness" : { + "/token" : { "get" : { - "tags" : [ "Application Observability" ], - "description" : "Performs a liveness probe to determine whether the runtime is working properly.", - "operationId" : "getLiveness", + "tags" : [ "Token Validation" ], + "description" : "Checks that the provided token has been signed by the present entity and asserts its validity. If token is valid, then the data address contained in its claims is decrypted and returned back to the caller.", + "operationId" : "validate", + "parameters" : [ { + "name" : "Authorization", + "in" : "header", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + } ], "responses" : { "200" : { + "description" : "Token is valid" + }, + "400" : { + "description" : "Request was malformed" + }, + "403" : { + "description" : "Token is invalid" + } + } + } + }, + "/federatedcatalog" : { + "post" : { + "operationId" : "getCachedCatalog", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FederatedCatalogCacheQuery" + } + } + } + }, + "responses" : { + "default" : { + "description" : "default response", "content" : { "application/json" : { "schema" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/HealthStatus" + "$ref" : "#/components/schemas/ContractOffer" } } } @@ -1028,43 +1737,67 @@ window.swaggerSpec={ } } }, - "/check/readiness" : { - "get" : { - "tags" : [ "Application Observability" ], - "description" : "Performs a readiness probe to determine whether the runtime is able to accept requests.", - "operationId" : "getReadiness", + "/callback/{processId}/deprovision" : { + "post" : { + "tags" : [ "HTTP Provisioner Webhook" ], + "operationId" : "callDeprovisionWebhook", + "parameters" : [ { + "name" : "processId", + "in" : "path", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeprovisionedResource" + } + } + } + }, "responses" : { - "200" : { + "default" : { + "description" : "default response", "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/HealthStatus" - } - } + "application/json" : { } + } + } + } + } + }, + "/callback/{processId}/provision" : { + "post" : { + "tags" : [ "HTTP Provisioner Webhook" ], + "operationId" : "callProvisionWebhook", + "parameters" : [ { + "name" : "processId", + "in" : "path", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProvisionerWebhookRequest" } } } - } - } - }, - "/check/startup" : { - "get" : { - "tags" : [ "Application Observability" ], - "description" : "Performs a startup probe to determine whether the runtime has completed startup.", - "operationId" : "getStartup", + }, "responses" : { - "200" : { + "default" : { + "description" : "default response", "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/HealthStatus" - } - } - } + "application/json" : { } } } } @@ -1363,75 +2096,6 @@ window.swaggerSpec={ } } }, - "/instances" : { - "get" : { - "tags" : [ "Dataplane Selector" ], - "operationId" : "getAll", - "responses" : { - "default" : { - "description" : "default response", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DataPlaneInstance" - } - } - } - } - } - } - }, - "post" : { - "tags" : [ "Dataplane Selector" ], - "operationId" : "addEntry", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataPlaneInstance" - } - } - } - }, - "responses" : { - "default" : { - "description" : "default response", - "content" : { - "application/json" : { } - } - } - } - } - }, - "/instances/select" : { - "post" : { - "tags" : [ "Dataplane Selector" ], - "operationId" : "find", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SelectionRequest" - } - } - } - }, - "responses" : { - "default" : { - "description" : "default response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DataPlaneInstance" - } - } - } - } - } - } - }, "/transferprocess" : { "get" : { "tags" : [ "Transfer Process" ], @@ -1856,6 +2520,95 @@ window.swaggerSpec={ } } }, + "Asset" : { + "type" : "object", + "properties" : { + "createdAt" : { + "type" : "integer", + "format" : "int64" + }, + "id" : { + "type" : "string" + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } + } + } + }, + "AssetEntryDto" : { + "required" : [ "asset", "dataAddress" ], + "type" : "object", + "properties" : { + "asset" : { + "$ref" : "#/components/schemas/AssetRequestDto" + }, + "dataAddress" : { + "$ref" : "#/components/schemas/DataAddressDto" + } + } + }, + "AssetRequestDto" : { + "required" : [ "properties" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } + } + } + }, + "AssetResponseDto" : { + "type" : "object", + "properties" : { + "createdAt" : { + "type" : "integer", + "format" : "int64" + }, + "id" : { + "type" : "string" + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } + } + } + }, + "Catalog" : { + "type" : "object", + "properties" : { + "contractOffers" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ContractOffer" + } + }, + "id" : { + "type" : "string" + } + } + }, + "CatalogRequestDto" : { + "required" : [ "providerUrl" ], + "type" : "object", + "properties" : { + "providerUrl" : { + "type" : "string" + }, + "querySpec" : { + "$ref" : "#/components/schemas/QuerySpecDto" + } + } + }, "Constraint" : { "required" : [ "edctype" ], "type" : "object", @@ -1981,6 +2734,44 @@ window.swaggerSpec={ } } }, + "ContractOffer" : { + "type" : "object", + "properties" : { + "asset" : { + "$ref" : "#/components/schemas/Asset" + }, + "consumer" : { + "type" : "string", + "format" : "uri" + }, + "contractEnd" : { + "type" : "string", + "format" : "date-time" + }, + "contractStart" : { + "type" : "string", + "format" : "date-time" + }, + "id" : { + "type" : "string" + }, + "offerEnd" : { + "type" : "string", + "format" : "date-time" + }, + "offerStart" : { + "type" : "string", + "format" : "date-time" + }, + "policy" : { + "$ref" : "#/components/schemas/Policy" + }, + "provider" : { + "type" : "string", + "format" : "uri" + } + } + }, "ContractOfferDescription" : { "required" : [ "assetId", "offerId", "policy" ], "type" : "object", @@ -1996,6 +2787,20 @@ window.swaggerSpec={ } } }, + "Criterion" : { + "type" : "object", + "properties" : { + "operandLeft" : { + "type" : "object" + }, + "operandRight" : { + "type" : "object" + }, + "operator" : { + "type" : "string" + } + } + }, "CriterionDto" : { "required" : [ "operandLeft", "operator" ], "type" : "object", @@ -2022,6 +2827,18 @@ window.swaggerSpec={ } } }, + "DataAddressDto" : { + "required" : [ "properties" ], + "type" : "object", + "properties" : { + "properties" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + } + }, "DataAddressInformationDto" : { "type" : "object", "properties" : { @@ -2033,6 +2850,42 @@ window.swaggerSpec={ } } }, + "DataFlowRequest" : { + "type" : "object", + "properties" : { + "callbackAddress" : { + "type" : "string", + "format" : "url" + }, + "destinationDataAddress" : { + "$ref" : "#/components/schemas/DataAddress" + }, + "id" : { + "type" : "string" + }, + "processId" : { + "type" : "string" + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "sourceDataAddress" : { + "$ref" : "#/components/schemas/DataAddress" + }, + "traceContext" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "trackable" : { + "type" : "boolean" + } + } + }, "DataPlaneInstance" : { "type" : "object", "properties" : { @@ -2136,6 +2989,17 @@ window.swaggerSpec={ } } }, + "FederatedCatalogCacheQuery" : { + "type" : "object", + "properties" : { + "criteria" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Criterion" + } + } + } + }, "HealthCheckResult" : { "type" : "object", "properties" : { @@ -2435,6 +3299,15 @@ window.swaggerSpec={ } } }, + "TransferProcessFailStateDto" : { + "required" : [ "errorMessage" ], + "type" : "object", + "properties" : { + "errorMessage" : { + "type" : "string" + } + } + }, "TransferRequestDto" : { "required" : [ "assetId", "connectorAddress", "connectorId", "contractId", "dataDestination", "protocol", "transferType" ], "type" : "object", diff --git a/extensions/control-plane/provision/provision-oauth2/README.md b/extensions/control-plane/provision/provision-oauth2/README.md index 281430e38bf..cc6e81330a9 100644 --- a/extensions/control-plane/provision/provision-oauth2/README.md +++ b/extensions/control-plane/provision/provision-oauth2/README.md @@ -23,7 +23,7 @@ by consumer or provider). ## How to use it The extension works for all the `HttpData` addresses that contain the "oauth2" properties (defined in -[Oauth2DataAddressSchema](src/main/java/org/eclipse/dataspaceconnector/provision/oauth2/Oauth2DataAddressSchema.java)): +[Oauth2DataAddressSchema](src/main/java/org/eclipse/edc/connector/provision/oauth2/Oauth2DataAddressSchema.java)): - `oauth2:clientId`: the client id - `oauth2:clientSecret`: the client secret - `oauth2:tokenUrl`: the url where the token will be requested diff --git a/gradle.properties b/gradle.properties index a210d36aaeb..a7455dd27d0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,11 @@ -groupId=org.eclipse.dataspaceconnector +groupId=org.eclipse.edc javaVersion=11 defaultVersion=0.0.1-SNAPSHOT # for now, we're using the same version for the autodoc plugin, the processor and the runtime-metamodel lib, but that could # change in the future annotationProcessorVersion=0.0.1-SNAPSHOT edcGradlePluginsVersion=0.0.1-SNAPSHOT -metaModelVersion=0.0.1-20221024-SNAPSHOT +metaModelVersion=0.0.1-SNAPSHOT edcDeveloperId=mspiekermann edcDeveloperName=Markus Spiekermann diff --git a/resources/openapi/openapi.yaml b/resources/openapi/openapi.yaml index bc8463555c9..274346cc2d4 100644 --- a/resources/openapi/openapi.yaml +++ b/resources/openapi/openapi.yaml @@ -8,7 +8,370 @@ info: version: 1.0.0-SNAPSHOT servers: - url: / +tags: +- name: Data Plane control API + description: 'Api targeted by the Control Plane to delegate a data transfer (Provider + Push or Streaming) to the Data Plane after the contract has been successfully + negotiated and agreed between the two participants. ' +- name: Data Plane public API + description: "The public API of the Data Plane is a data proxy enabling a data consumer\ + \ to actively querydata from the provider data source (e.g. backend Rest API,\ + \ internal database...) through its Data Planeinstance. Thus the Data Plane is\ + \ the only entry/output door for the data, which avoids the provider to exposedirectly\ + \ its data externally.The Data Plane public API being a proxy, it supports all\ + \ verbs (i.e. GET, POST, PUT, PATCH, DELETE), whichcan then conveyed until the\ + \ data source is required. This is especially useful when the actual data sourceis\ + \ a Rest API itself.In the same manner, any set of arbitrary query parameters,\ + \ path parameters and request body are supported (in the limits fixed by the HTTP\ + \ server) and can also conveyed to the actual data source." paths: + /check/health: + get: + tags: + - Application Observability + description: Performs a liveness probe to determine whether the runtime is working + properly. + operationId: checkHealth + responses: + "200": + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/HealthStatus' + /check/liveness: + get: + tags: + - Application Observability + description: Performs a liveness probe to determine whether the runtime is working + properly. + operationId: getLiveness + responses: + "200": + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/HealthStatus' + /check/readiness: + get: + tags: + - Application Observability + description: Performs a readiness probe to determine whether the runtime is + able to accept requests. + operationId: getReadiness + responses: + "200": + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/HealthStatus' + /check/startup: + get: + tags: + - Application Observability + description: Performs a startup probe to determine whether the runtime has completed + startup. + operationId: getStartup + responses: + "200": + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/HealthStatus' + /assets: + get: + tags: + - Asset + description: Gets all assets according to a particular query + operationId: getAllAssets + parameters: + - name: offset + in: query + required: false + style: form + explode: true + schema: + type: integer + format: int32 + - name: limit + in: query + required: false + style: form + explode: true + schema: + type: integer + format: int32 + - name: filter + in: query + required: false + style: form + explode: true + schema: + type: string + - name: sort + in: query + required: false + style: form + explode: true + schema: + type: string + enum: + - ASC + - DESC + - name: sortField + in: query + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AssetResponseDto' + "400": + description: Request body was malformed + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + deprecated: true + post: + tags: + - Asset + description: Creates a new asset together with a data address + operationId: createAsset + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AssetEntryDto' + responses: + "200": + description: Asset was created successfully. Returns the asset Id and created + timestamp + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponseDto' + "400": + description: Request body was malformed + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + "409": + description: "Could not create asset, because an asset with that ID already\ + \ exists" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + /assets/request: + post: + tags: + - Asset + description: ' all assets according to a particular query' + operationId: requestAssets + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QuerySpecDto' + responses: + "200": + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AssetResponseDto' + "400": + description: Request body was malformed + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + /assets/{id}: + get: + tags: + - Asset + description: Gets an asset with the given ID + operationId: getAsset + parameters: + - name: id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: The asset + content: + application/json: + schema: + $ref: '#/components/schemas/AssetResponseDto' + "400": + description: "Request was malformed, e.g. id was null" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + "404": + description: An asset with the given ID does not exist + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + delete: + tags: + - Asset + description: "Removes an asset with the given ID if possible. Deleting an asset\ + \ is only possible if that asset is not yet referenced by a contract agreement,\ + \ in which case an error is returned. DANGER ZONE: Note that deleting assets\ + \ can have unexpected results, especially for contract offers that have been\ + \ sent out or ongoing or contract negotiations." + operationId: removeAsset + parameters: + - name: id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Asset was deleted successfully + "400": + description: "Request was malformed, e.g. id was null" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + "404": + description: An asset with the given ID does not exist + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + "409": + description: "The asset cannot be deleted, because it is referenced by a\ + \ contract agreement" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + /catalog: + get: + tags: + - Catalog + operationId: getCatalog + parameters: + - name: providerUrl + in: query + required: true + style: form + explode: true + schema: + type: string + - name: offset + in: query + required: false + style: form + explode: true + schema: + type: integer + format: int32 + - name: limit + in: query + required: false + style: form + explode: true + schema: + type: integer + format: int32 + - name: filter + in: query + required: false + style: form + explode: true + schema: + type: string + - name: sort + in: query + required: false + style: form + explode: true + schema: + type: string + enum: + - ASC + - DESC + - name: sortField + in: query + required: false + style: form + explode: true + schema: + type: string + responses: + default: + description: Gets contract offers (=catalog) of a single connector + content: + application/json: + schema: + $ref: '#/components/schemas/Catalog' + deprecated: true + /catalog/request: + post: + tags: + - Catalog + operationId: requestCatalog + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/CatalogRequestDto' + required: true + responses: + default: + description: Gets contract offers (=catalog) of a single connector + content: + application/json: + schema: + $ref: '#/components/schemas/Catalog' /contractagreements: get: tags: @@ -594,37 +957,272 @@ paths: schema: type: string responses: - "200": - description: Request to decline the Contract negotiation was successfully - received - links: - poll-state: - operationId: getNegotiationState - "400": - description: "Request was malformed, e.g. id was null" - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ApiErrorDetail' - "404": - description: A contract negotiation with the given ID does not exist + "200": + description: Request to decline the Contract negotiation was successfully + received + links: + poll-state: + operationId: getNegotiationState + "400": + description: "Request was malformed, e.g. id was null" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + "404": + description: A contract negotiation with the given ID does not exist + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + /contractnegotiations/{id}/state: + get: + tags: + - Contract Negotiation + description: Gets the state of a contract negotiation with the given ID + operationId: getNegotiationState + parameters: + - name: id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: The contract negotiation's state + content: + application/json: + schema: + $ref: '#/components/schemas/NegotiationState' + "400": + description: "Request was malformed, e.g. id was null" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + "404": + description: An contract negotiation with the given ID does not exist + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + /transferprocess/{processId}/complete: + post: + tags: + - Transfer Process Control Api + description: "Requests completion of the transfer process. Due to the asynchronous\ + \ nature of transfers, a successful response only indicates that the request\ + \ was successfully received" + operationId: complete + parameters: + - name: processId + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "400": + description: "Request was malformed, e.g. id was null" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + /transferprocess/{processId}/fail: + post: + tags: + - Transfer Process Control Api + description: "Requests completion of the transfer process. Due to the asynchronous\ + \ nature of transfers, a successful response only indicates that the request\ + \ was successfully received" + operationId: fail + parameters: + - name: processId + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferProcessFailStateDto' + required: true + responses: + "400": + description: "Request was malformed, e.g. id was null" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiErrorDetail' + /transfer: + post: + tags: + - Data Plane control API + description: Initiates a data transfer for the given request. The transfer will + be performed asynchronously. + operationId: initiateTransfer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataFlowRequest' + responses: + "200": + description: Data transfer initiated + "400": + description: Failed to validate request + /transfer/{processId}: + get: + tags: + - Data Plane control API + description: Get the current state of a data transfer. + operationId: getTransferState + parameters: + - name: processId + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: Missing access token + /{any}: + get: + tags: + - Data Plane public API + description: Send `GET` data query to the Data Plane. + operationId: get + responses: + "400": + description: Missing access token + "403": + description: Access token is expired or invalid + "500": + description: Failed to transfer data + put: + tags: + - Data Plane public API + description: Send `PUT` data query to the Data Plane. + operationId: put + responses: + "400": + description: Missing access token + "403": + description: Access token is expired or invalid + "500": + description: Failed to transfer data + post: + tags: + - Data Plane public API + description: Send `POST` data query to the Data Plane. + operationId: post + responses: + "400": + description: Missing access token + "403": + description: Access token is expired or invalid + "500": + description: Failed to transfer data + delete: + tags: + - Data Plane public API + description: Send `DELETE` data query to the Data Plane. + operationId: delete + responses: + "400": + description: Missing access token + "403": + description: Access token is expired or invalid + "500": + description: Failed to transfer data + patch: + tags: + - Data Plane public API + description: Send `PATCH` data query to the Data Plane. + operationId: patch + responses: + "400": + description: Missing access token + "403": + description: Access token is expired or invalid + "500": + description: Failed to transfer data + /instances: + get: + tags: + - Dataplane Selector + operationId: getAll + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DataPlaneInstance' + post: + tags: + - Dataplane Selector + operationId: addEntry + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPlaneInstance' + responses: + default: + description: default response + content: + application/json: {} + /instances/select: + post: + tags: + - Dataplane Selector + operationId: find + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SelectionRequest' + responses: + default: + description: default response content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/ApiErrorDetail' - /contractnegotiations/{id}/state: + $ref: '#/components/schemas/DataPlaneInstance' + /token: get: tags: - - Contract Negotiation - description: Gets the state of a contract negotiation with the given ID - operationId: getNegotiationState + - Token Validation + description: "Checks that the provided token has been signed by the present\ + \ entity and asserts its validity. If token is valid, then the data address\ + \ contained in its claims is decrypted and returned back to the caller." + operationId: validate parameters: - - name: id - in: path + - name: Authorization + in: header required: true style: simple explode: false @@ -632,27 +1230,28 @@ paths: type: string responses: "200": - description: The contract negotiation's state - content: - application/json: - schema: - $ref: '#/components/schemas/NegotiationState' + description: Token is valid "400": - description: "Request was malformed, e.g. id was null" - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ApiErrorDetail' - "404": - description: An contract negotiation with the given ID does not exist + description: Request was malformed + "403": + description: Token is invalid + /federatedcatalog: + post: + operationId: getCachedCatalog + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FederatedCatalogCacheQuery' + responses: + default: + description: default response content: application/json: schema: type: array items: - $ref: '#/components/schemas/ApiErrorDetail' + $ref: '#/components/schemas/ContractOffer' /callback/{processId}/deprovision: post: tags: @@ -699,66 +1298,6 @@ paths: description: default response content: application/json: {} - /check/health: - get: - tags: - - Application Observability - description: Performs a liveness probe to determine whether the runtime is working - properly. - operationId: checkHealth - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/HealthStatus' - /check/liveness: - get: - tags: - - Application Observability - description: Performs a liveness probe to determine whether the runtime is working - properly. - operationId: getLiveness - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/HealthStatus' - /check/readiness: - get: - tags: - - Application Observability - description: Performs a readiness probe to determine whether the runtime is - able to accept requests. - operationId: getReadiness - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/HealthStatus' - /check/startup: - get: - tags: - - Application Observability - description: Performs a startup probe to determine whether the runtime has completed - startup. - operationId: getStartup - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/HealthStatus' /policydefinitions: get: tags: @@ -967,51 +1506,6 @@ paths: type: array items: $ref: '#/components/schemas/ApiErrorDetail' - /instances: - get: - tags: - - Dataplane Selector - operationId: getAll - responses: - default: - description: default response - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DataPlaneInstance' - post: - tags: - - Dataplane Selector - operationId: addEntry - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPlaneInstance' - responses: - default: - description: default response - content: - application/json: {} - /instances/select: - post: - tags: - - Dataplane Selector - operationId: find - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SelectionRequest' - responses: - default: - description: default response - content: - application/json: - schema: - $ref: '#/components/schemas/DataPlaneInstance' /transferprocess: get: tags: @@ -1312,6 +1806,69 @@ components: type: string type: type: string + Asset: + type: object + properties: + createdAt: + type: integer + format: int64 + id: + type: string + properties: + type: object + additionalProperties: + type: object + AssetEntryDto: + required: + - asset + - dataAddress + type: object + properties: + asset: + $ref: '#/components/schemas/AssetRequestDto' + dataAddress: + $ref: '#/components/schemas/DataAddressDto' + AssetRequestDto: + required: + - properties + type: object + properties: + id: + type: string + properties: + type: object + additionalProperties: + type: object + AssetResponseDto: + type: object + properties: + createdAt: + type: integer + format: int64 + id: + type: string + properties: + type: object + additionalProperties: + type: object + Catalog: + type: object + properties: + contractOffers: + type: array + items: + $ref: '#/components/schemas/ContractOffer' + id: + type: string + CatalogRequestDto: + required: + - providerUrl + type: object + properties: + providerUrl: + type: string + querySpec: + $ref: '#/components/schemas/QuerySpecDto' Constraint: required: - edctype @@ -1408,6 +1965,33 @@ components: updatedAt: type: integer format: int64 + ContractOffer: + type: object + properties: + asset: + $ref: '#/components/schemas/Asset' + consumer: + type: string + format: uri + contractEnd: + type: string + format: date-time + contractStart: + type: string + format: date-time + id: + type: string + offerEnd: + type: string + format: date-time + offerStart: + type: string + format: date-time + policy: + $ref: '#/components/schemas/Policy' + provider: + type: string + format: uri ContractOfferDescription: required: - assetId @@ -1421,6 +2005,15 @@ components: type: string policy: $ref: '#/components/schemas/Policy' + Criterion: + type: object + properties: + operandLeft: + type: object + operandRight: + type: object + operator: + type: string CriterionDto: required: - operandLeft @@ -1440,6 +2033,15 @@ components: type: object additionalProperties: type: string + DataAddressDto: + required: + - properties + type: object + properties: + properties: + type: object + additionalProperties: + type: string DataAddressInformationDto: type: object properties: @@ -1447,6 +2049,30 @@ components: type: object additionalProperties: type: string + DataFlowRequest: + type: object + properties: + callbackAddress: + type: string + format: url + destinationDataAddress: + $ref: '#/components/schemas/DataAddress' + id: + type: string + processId: + type: string + properties: + type: object + additionalProperties: + type: string + sourceDataAddress: + $ref: '#/components/schemas/DataAddress' + traceContext: + type: object + additionalProperties: + type: string + trackable: + type: boolean DataPlaneInstance: type: object properties: @@ -1515,6 +2141,13 @@ components: type: array items: type: string + FederatedCatalogCacheQuery: + type: object + properties: + criteria: + type: array + items: + $ref: '#/components/schemas/Criterion' HealthCheckResult: type: object properties: @@ -1730,6 +2363,13 @@ components: updatedAt: type: integer format: int64 + TransferProcessFailStateDto: + required: + - errorMessage + type: object + properties: + errorMessage: + type: string TransferRequestDto: required: - assetId diff --git a/resources/openapi/yaml/api-observability.yaml b/resources/openapi/yaml/api-observability.yaml new file mode 100644 index 00000000000..5c560a00cbc --- /dev/null +++ b/resources/openapi/yaml/api-observability.yaml @@ -0,0 +1,102 @@ +openapi: 3.0.1 +paths: + /check/health: + get: + description: Performs a liveness probe to determine whether the runtime is working + properly. + operationId: checkHealth + responses: + "200": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/HealthStatus' + tags: + - Application Observability + /check/liveness: + get: + description: Performs a liveness probe to determine whether the runtime is working + properly. + operationId: getLiveness + responses: + "200": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/HealthStatus' + tags: + - Application Observability + /check/readiness: + get: + description: Performs a readiness probe to determine whether the runtime is + able to accept requests. + operationId: getReadiness + responses: + "200": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/HealthStatus' + tags: + - Application Observability + /check/startup: + get: + description: Performs a startup probe to determine whether the runtime has completed + startup. + operationId: getStartup + responses: + "200": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/HealthStatus' + tags: + - Application Observability +components: + schemas: + Failure: + type: object + example: null + properties: + messages: + type: array + example: null + items: + type: string + example: null + HealthCheckResult: + type: object + example: null + properties: + component: + type: string + example: null + failure: + $ref: '#/components/schemas/Failure' + isHealthy: + type: boolean + example: null + HealthStatus: + type: object + example: null + properties: + componentResults: + type: array + example: null + items: + $ref: '#/components/schemas/HealthCheckResult' + isSystemHealthy: + type: boolean + example: null diff --git a/resources/openapi/yaml/asset-api.yaml b/resources/openapi/yaml/asset-api.yaml index 124ded091da..a283ee9e9d8 100644 --- a/resources/openapi/yaml/asset-api.yaml +++ b/resources/openapi/yaml/asset-api.yaml @@ -1 +1,338 @@ openapi: 3.0.1 +paths: + /assets: + get: + deprecated: true + description: Gets all assets according to a particular query + operationId: getAllAssets + parameters: + - in: query + name: offset + schema: + type: integer + format: int32 + example: null + - in: query + name: limit + schema: + type: integer + format: int32 + example: null + - in: query + name: filter + schema: + type: string + example: null + - in: query + name: sort + schema: + type: string + enum: + - ASC + - DESC + example: null + - in: query + name: sortField + schema: + type: string + example: null + responses: + "200": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/AssetResponseDto' + "400": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + description: Request body was malformed + tags: + - Asset + post: + description: Creates a new asset together with a data address + operationId: createAsset + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AssetEntryDto' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponseDto' + description: Asset was created successfully. Returns the asset Id and created + timestamp + "400": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + description: Request body was malformed + "409": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + description: "Could not create asset, because an asset with that ID already\ + \ exists" + tags: + - Asset + /assets/request: + post: + description: ' all assets according to a particular query' + operationId: requestAssets + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QuerySpecDto' + responses: + "200": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/AssetResponseDto' + "400": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + description: Request body was malformed + tags: + - Asset + /assets/{id}: + delete: + description: "Removes an asset with the given ID if possible. Deleting an asset\ + \ is only possible if that asset is not yet referenced by a contract agreement,\ + \ in which case an error is returned. DANGER ZONE: Note that deleting assets\ + \ can have unexpected results, especially for contract offers that have been\ + \ sent out or ongoing or contract negotiations." + operationId: removeAsset + parameters: + - in: path + name: id + required: true + schema: + type: string + example: null + responses: + "200": + description: Asset was deleted successfully + "400": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + description: "Request was malformed, e.g. id was null" + "404": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + description: An asset with the given ID does not exist + "409": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + description: "The asset cannot be deleted, because it is referenced by a\ + \ contract agreement" + tags: + - Asset + get: + description: Gets an asset with the given ID + operationId: getAsset + parameters: + - in: path + name: id + required: true + schema: + type: string + example: null + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetResponseDto' + description: The asset + "400": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + description: "Request was malformed, e.g. id was null" + "404": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + description: An asset with the given ID does not exist + tags: + - Asset +components: + schemas: + ApiErrorDetail: + type: object + example: null + properties: + invalidValue: + type: string + example: null + message: + type: string + example: null + path: + type: string + example: null + type: + type: string + example: null + AssetEntryDto: + type: object + example: null + properties: + asset: + $ref: '#/components/schemas/AssetRequestDto' + dataAddress: + $ref: '#/components/schemas/DataAddressDto' + required: + - asset + - dataAddress + AssetRequestDto: + type: object + example: null + properties: + id: + type: string + example: null + properties: + type: object + additionalProperties: + type: object + example: null + example: null + required: + - properties + AssetResponseDto: + type: object + example: null + properties: + createdAt: + type: integer + format: int64 + example: null + id: + type: string + example: null + properties: + type: object + additionalProperties: + type: object + example: null + example: null + CriterionDto: + type: object + example: null + properties: + operandLeft: + type: object + example: null + operandRight: + type: object + example: null + operator: + type: string + example: null + required: + - operandLeft + - operator + DataAddressDto: + type: object + example: null + properties: + properties: + type: object + additionalProperties: + type: string + example: null + example: null + required: + - properties + IdResponseDto: + type: object + example: null + properties: + createdAt: + type: integer + format: int64 + example: null + id: + type: string + example: null + QuerySpecDto: + type: object + example: null + properties: + filter: + type: string + example: null + filterExpression: + type: array + example: null + items: + $ref: '#/components/schemas/CriterionDto' + limit: + type: integer + format: int32 + example: null + offset: + type: integer + format: int32 + example: null + sortField: + type: string + example: null + sortOrder: + type: string + enum: + - ASC + - DESC + example: null diff --git a/resources/openapi/yaml/catalog-api.yaml b/resources/openapi/yaml/catalog-api.yaml index 124ded091da..4ade5b74b7e 100644 --- a/resources/openapi/yaml/catalog-api.yaml +++ b/resources/openapi/yaml/catalog-api.yaml @@ -1 +1,337 @@ openapi: 3.0.1 +paths: + /catalog: + get: + deprecated: true + operationId: getCatalog + parameters: + - in: query + name: providerUrl + required: true + schema: + type: string + example: null + - in: query + name: offset + schema: + type: integer + format: int32 + example: null + - in: query + name: limit + schema: + type: integer + format: int32 + example: null + - in: query + name: filter + schema: + type: string + example: null + - in: query + name: sort + schema: + type: string + enum: + - ASC + - DESC + example: null + - in: query + name: sortField + schema: + type: string + example: null + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Catalog' + description: Gets contract offers (=catalog) of a single connector + tags: + - Catalog + /catalog/request: + post: + operationId: requestCatalog + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/CatalogRequestDto' + required: true + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Catalog' + description: Gets contract offers (=catalog) of a single connector + tags: + - Catalog +components: + schemas: + Action: + type: object + example: null + properties: + constraint: + $ref: '#/components/schemas/Constraint' + includedIn: + type: string + example: null + type: + type: string + example: null + Asset: + type: object + example: null + properties: + createdAt: + type: integer + format: int64 + example: null + id: + type: string + example: null + properties: + type: object + additionalProperties: + type: object + example: null + example: null + Catalog: + type: object + example: null + properties: + contractOffers: + type: array + example: null + items: + $ref: '#/components/schemas/ContractOffer' + id: + type: string + example: null + CatalogRequestDto: + type: object + example: null + properties: + providerUrl: + type: string + example: null + querySpec: + $ref: '#/components/schemas/QuerySpecDto' + required: + - providerUrl + Constraint: + type: object + discriminator: + propertyName: edctype + example: null + properties: + edctype: + type: string + example: null + required: + - edctype + ContractOffer: + type: object + example: null + properties: + asset: + $ref: '#/components/schemas/Asset' + consumer: + type: string + format: uri + example: null + contractEnd: + type: string + format: date-time + example: null + contractStart: + type: string + format: date-time + example: null + id: + type: string + example: null + offerEnd: + type: string + format: date-time + example: null + offerStart: + type: string + format: date-time + example: null + policy: + $ref: '#/components/schemas/Policy' + provider: + type: string + format: uri + example: null + CriterionDto: + type: object + example: null + properties: + operandLeft: + type: object + example: null + operandRight: + type: object + example: null + operator: + type: string + example: null + required: + - operandLeft + - operator + Duty: + type: object + example: null + properties: + action: + $ref: '#/components/schemas/Action' + assignee: + type: string + example: null + assigner: + type: string + example: null + consequence: + $ref: '#/components/schemas/Duty' + constraints: + type: array + example: null + items: + $ref: '#/components/schemas/Constraint' + parentPermission: + $ref: '#/components/schemas/Permission' + target: + type: string + example: null + uid: + type: string + example: null + Permission: + type: object + example: null + properties: + action: + $ref: '#/components/schemas/Action' + assignee: + type: string + example: null + assigner: + type: string + example: null + constraints: + type: array + example: null + items: + $ref: '#/components/schemas/Constraint' + duties: + type: array + example: null + items: + $ref: '#/components/schemas/Duty' + target: + type: string + example: null + uid: + type: string + example: null + Policy: + type: object + example: null + properties: + '@type': + type: string + enum: + - SET + - OFFER + - CONTRACT + example: null + assignee: + type: string + example: null + assigner: + type: string + example: null + extensibleProperties: + type: object + additionalProperties: + type: object + example: null + example: null + inheritsFrom: + type: string + example: null + obligations: + type: array + example: null + items: + $ref: '#/components/schemas/Duty' + permissions: + type: array + example: null + items: + $ref: '#/components/schemas/Permission' + prohibitions: + type: array + example: null + items: + $ref: '#/components/schemas/Prohibition' + target: + type: string + example: null + Prohibition: + type: object + example: null + properties: + action: + $ref: '#/components/schemas/Action' + assignee: + type: string + example: null + assigner: + type: string + example: null + constraints: + type: array + example: null + items: + $ref: '#/components/schemas/Constraint' + target: + type: string + example: null + uid: + type: string + example: null + QuerySpecDto: + type: object + example: null + properties: + filter: + type: string + example: null + filterExpression: + type: array + example: null + items: + $ref: '#/components/schemas/CriterionDto' + limit: + type: integer + format: int32 + example: null + offset: + type: integer + format: int32 + example: null + sortField: + type: string + example: null + sortOrder: + type: string + enum: + - ASC + - DESC + example: null diff --git a/resources/openapi/yaml/contractagreement-api.yaml b/resources/openapi/yaml/contract-agreement-api.yaml similarity index 80% rename from resources/openapi/yaml/contractagreement-api.yaml rename to resources/openapi/yaml/contract-agreement-api.yaml index 2cf74f7cd71..731497cf7c6 100644 --- a/resources/openapi/yaml/contractagreement-api.yaml +++ b/resources/openapi/yaml/contract-agreement-api.yaml @@ -11,15 +11,18 @@ paths: schema: type: integer format: int32 + example: null - in: query name: limit schema: type: integer format: int32 + example: null - in: query name: filter schema: type: string + example: null - in: query name: sort schema: @@ -27,16 +30,19 @@ paths: enum: - ASC - DESC + example: null - in: query name: sortField schema: type: string + example: null responses: "200": content: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ContractAgreementDto' "400": @@ -44,6 +50,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request body was malformed @@ -64,6 +71,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ContractAgreementDto' "400": @@ -71,6 +79,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request body was malformed @@ -86,6 +95,7 @@ paths: required: true schema: type: string + example: null responses: "200": content: @@ -98,6 +108,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -106,6 +117,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: An contract agreement with the given ID does not exist @@ -115,55 +127,73 @@ components: schemas: Action: type: object + example: null properties: constraint: $ref: '#/components/schemas/Constraint' includedIn: type: string + example: null type: type: string + example: null ApiErrorDetail: type: object + example: null properties: invalidValue: type: string + example: null message: type: string + example: null path: type: string + example: null type: type: string + example: null Constraint: type: object discriminator: propertyName: edctype + example: null properties: edctype: type: string + example: null required: - edctype ContractAgreementDto: type: object + example: null properties: assetId: type: string + example: null consumerAgentId: type: string + example: null contractEndDate: type: integer format: int64 + example: null contractSigningDate: type: integer format: int64 + example: null contractStartDate: type: integer format: int64 + example: null id: type: string + example: null policy: $ref: '#/components/schemas/Policy' providerAgentId: type: string + example: null required: - assetId - consumerAgentId @@ -172,60 +202,78 @@ components: - providerAgentId CriterionDto: type: object + example: null properties: operandLeft: type: object + example: null operandRight: type: object + example: null operator: type: string + example: null required: - operandLeft - operator Duty: type: object + example: null properties: action: $ref: '#/components/schemas/Action' assignee: type: string + example: null assigner: type: string + example: null consequence: $ref: '#/components/schemas/Duty' constraints: type: array + example: null items: $ref: '#/components/schemas/Constraint' parentPermission: $ref: '#/components/schemas/Permission' target: type: string + example: null uid: type: string + example: null Permission: type: object + example: null properties: action: $ref: '#/components/schemas/Action' assignee: type: string + example: null assigner: type: string + example: null constraints: type: array + example: null items: $ref: '#/components/schemas/Constraint' duties: type: array + example: null items: $ref: '#/components/schemas/Duty' target: type: string + example: null uid: type: string + example: null Policy: type: object + example: null properties: '@type': type: string @@ -233,66 +281,89 @@ components: - SET - OFFER - CONTRACT + example: null assignee: type: string + example: null assigner: type: string + example: null extensibleProperties: type: object additionalProperties: type: object + example: null + example: null inheritsFrom: type: string + example: null obligations: type: array + example: null items: $ref: '#/components/schemas/Duty' permissions: type: array + example: null items: $ref: '#/components/schemas/Permission' prohibitions: type: array + example: null items: $ref: '#/components/schemas/Prohibition' target: type: string + example: null Prohibition: type: object + example: null properties: action: $ref: '#/components/schemas/Action' assignee: type: string + example: null assigner: type: string + example: null constraints: type: array + example: null items: $ref: '#/components/schemas/Constraint' target: type: string + example: null uid: type: string + example: null QuerySpecDto: type: object + example: null properties: filter: type: string + example: null filterExpression: type: array + example: null items: $ref: '#/components/schemas/CriterionDto' limit: type: integer format: int32 + example: null offset: type: integer format: int32 + example: null sortField: type: string + example: null sortOrder: type: string enum: - ASC - DESC + example: null diff --git a/resources/openapi/yaml/contractdefinition-api.yaml b/resources/openapi/yaml/contract-definition-api.yaml similarity index 86% rename from resources/openapi/yaml/contractdefinition-api.yaml rename to resources/openapi/yaml/contract-definition-api.yaml index 4f5977781f0..2216aa631cb 100644 --- a/resources/openapi/yaml/contractdefinition-api.yaml +++ b/resources/openapi/yaml/contract-definition-api.yaml @@ -11,15 +11,18 @@ paths: schema: type: integer format: int32 + example: null - in: query name: limit schema: type: integer format: int32 + example: null - in: query name: filter schema: type: string + example: null - in: query name: sort schema: @@ -27,16 +30,19 @@ paths: enum: - ASC - DESC + example: null - in: query name: sortField schema: type: string + example: null responses: "200": content: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ContractDefinitionResponseDto' "400": @@ -44,6 +50,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request was malformed @@ -70,6 +77,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request body was malformed @@ -78,6 +86,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Could not create contract definition, because a contract definition\ @@ -99,6 +108,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ContractDefinitionResponseDto' "400": @@ -106,6 +116,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request was malformed @@ -124,6 +135,7 @@ paths: required: true schema: type: string + example: null responses: "200": description: Contract definition was deleted successfully @@ -132,6 +144,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -140,6 +153,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: A contract definition with the given ID does not exist @@ -154,6 +168,7 @@ paths: required: true schema: type: string + example: null responses: "200": content: @@ -166,6 +181,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -174,6 +190,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: An contract agreement with the given ID does not exist @@ -183,87 +200,117 @@ components: schemas: ApiErrorDetail: type: object + example: null properties: invalidValue: type: string + example: null message: type: string + example: null path: type: string + example: null type: type: string + example: null ContractDefinitionRequestDto: type: object + example: null properties: accessPolicyId: type: string + example: null contractPolicyId: type: string + example: null criteria: type: array + example: null items: $ref: '#/components/schemas/CriterionDto' id: type: string + example: null required: - accessPolicyId - contractPolicyId - criteria ContractDefinitionResponseDto: type: object + example: null properties: accessPolicyId: type: string + example: null contractPolicyId: type: string + example: null createdAt: type: integer format: int64 + example: null criteria: type: array + example: null items: $ref: '#/components/schemas/CriterionDto' id: type: string + example: null CriterionDto: type: object + example: null properties: operandLeft: type: object + example: null operandRight: type: object + example: null operator: type: string + example: null required: - operandLeft - operator IdResponseDto: type: object + example: null properties: createdAt: type: integer format: int64 + example: null id: type: string + example: null QuerySpecDto: type: object + example: null properties: filter: type: string + example: null filterExpression: type: array + example: null items: $ref: '#/components/schemas/CriterionDto' limit: type: integer format: int32 + example: null offset: type: integer format: int32 + example: null sortField: type: string + example: null sortOrder: type: string enum: - ASC - DESC + example: null diff --git a/resources/openapi/yaml/contractnegotiation-api.yaml b/resources/openapi/yaml/contract-negotiation-api.yaml similarity index 85% rename from resources/openapi/yaml/contractnegotiation-api.yaml rename to resources/openapi/yaml/contract-negotiation-api.yaml index 193ea14f3c3..e303e689b42 100644 --- a/resources/openapi/yaml/contractnegotiation-api.yaml +++ b/resources/openapi/yaml/contract-negotiation-api.yaml @@ -11,15 +11,18 @@ paths: schema: type: integer format: int32 + example: null - in: query name: limit schema: type: integer format: int32 + example: null - in: query name: filter schema: type: string + example: null - in: query name: sort schema: @@ -27,16 +30,19 @@ paths: enum: - ASC - DESC + example: null - in: query name: sortField schema: type: string + example: null responses: "200": content: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ContractNegotiationDto' "400": @@ -44,6 +50,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request was malformed @@ -78,6 +85,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request body was malformed @@ -98,6 +106,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ContractNegotiationDto' "400": @@ -105,6 +114,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request was malformed @@ -120,6 +130,7 @@ paths: required: true schema: type: string + example: null responses: "200": content: @@ -132,6 +143,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -140,6 +152,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: An contract negotiation with the given ID does not exist @@ -156,6 +169,7 @@ paths: required: true schema: type: string + example: null responses: "200": content: @@ -169,6 +183,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -177,6 +192,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: An contract negotiation with the given ID does not exist @@ -195,6 +211,7 @@ paths: required: true schema: type: string + example: null responses: "200": description: Request to cancel the Contract negotiation was successfully @@ -207,6 +224,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -215,6 +233,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: A contract negotiation with the given ID does not exist @@ -233,6 +252,7 @@ paths: required: true schema: type: string + example: null responses: "200": description: Request to decline the Contract negotiation was successfully @@ -245,6 +265,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -253,6 +274,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: A contract negotiation with the given ID does not exist @@ -268,6 +290,7 @@ paths: required: true schema: type: string + example: null responses: "200": content: @@ -280,6 +303,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -288,6 +312,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: An contract negotiation with the given ID does not exist @@ -297,55 +322,73 @@ components: schemas: Action: type: object + example: null properties: constraint: $ref: '#/components/schemas/Constraint' includedIn: type: string + example: null type: type: string + example: null ApiErrorDetail: type: object + example: null properties: invalidValue: type: string + example: null message: type: string + example: null path: type: string + example: null type: type: string + example: null Constraint: type: object discriminator: propertyName: edctype + example: null properties: edctype: type: string + example: null required: - edctype ContractAgreementDto: type: object + example: null properties: assetId: type: string + example: null consumerAgentId: type: string + example: null contractEndDate: type: integer format: int64 + example: null contractSigningDate: type: integer format: int64 + example: null contractStartDate: type: integer format: int64 + example: null id: type: string + example: null policy: $ref: '#/components/schemas/Policy' providerAgentId: type: string + example: null required: - assetId - consumerAgentId @@ -354,37 +397,50 @@ components: - providerAgentId ContractNegotiationDto: type: object + example: null properties: contractAgreementId: type: string + example: null counterPartyAddress: type: string + example: null createdAt: type: integer format: int64 + example: null errorDetail: type: string + example: null id: type: string + example: null protocol: type: string + example: null state: type: string + example: null type: type: string enum: - CONSUMER - PROVIDER + example: null updatedAt: type: integer format: int64 + example: null ContractOfferDescription: type: object + example: null properties: assetId: type: string + example: null offerId: type: string + example: null policy: $ref: '#/components/schemas/Policy' required: @@ -393,56 +449,73 @@ components: - policy CriterionDto: type: object + example: null properties: operandLeft: type: object + example: null operandRight: type: object + example: null operator: type: string + example: null required: - operandLeft - operator Duty: type: object + example: null properties: action: $ref: '#/components/schemas/Action' assignee: type: string + example: null assigner: type: string + example: null consequence: $ref: '#/components/schemas/Duty' constraints: type: array + example: null items: $ref: '#/components/schemas/Constraint' parentPermission: $ref: '#/components/schemas/Permission' target: type: string + example: null uid: type: string + example: null IdResponseDto: type: object + example: null properties: createdAt: type: integer format: int64 + example: null id: type: string + example: null NegotiationInitiateRequestDto: type: object + example: null properties: connectorAddress: type: string + example: null connectorId: type: string + example: null offer: $ref: '#/components/schemas/ContractOfferDescription' protocol: type: string + example: null required: - connectorAddress - connectorId @@ -450,32 +523,42 @@ components: - protocol NegotiationState: type: object + example: null properties: state: type: string + example: null Permission: type: object + example: null properties: action: $ref: '#/components/schemas/Action' assignee: type: string + example: null assigner: type: string + example: null constraints: type: array + example: null items: $ref: '#/components/schemas/Constraint' duties: type: array + example: null items: $ref: '#/components/schemas/Duty' target: type: string + example: null uid: type: string + example: null Policy: type: object + example: null properties: '@type': type: string @@ -483,66 +566,89 @@ components: - SET - OFFER - CONTRACT + example: null assignee: type: string + example: null assigner: type: string + example: null extensibleProperties: type: object additionalProperties: type: object + example: null + example: null inheritsFrom: type: string + example: null obligations: type: array + example: null items: $ref: '#/components/schemas/Duty' permissions: type: array + example: null items: $ref: '#/components/schemas/Permission' prohibitions: type: array + example: null items: $ref: '#/components/schemas/Prohibition' target: type: string + example: null Prohibition: type: object + example: null properties: action: $ref: '#/components/schemas/Action' assignee: type: string + example: null assigner: type: string + example: null constraints: type: array + example: null items: $ref: '#/components/schemas/Constraint' target: type: string + example: null uid: type: string + example: null QuerySpecDto: type: object + example: null properties: filter: type: string + example: null filterExpression: type: array + example: null items: $ref: '#/components/schemas/CriterionDto' limit: type: integer format: int32 + example: null offset: type: integer format: int32 + example: null sortField: type: string + example: null sortOrder: type: string enum: - ASC - DESC + example: null diff --git a/resources/openapi/yaml/control-plane-api.yaml b/resources/openapi/yaml/control-plane-api.yaml index 124ded091da..26ffc150529 100644 --- a/resources/openapi/yaml/control-plane-api.yaml +++ b/resources/openapi/yaml/control-plane-api.yaml @@ -1 +1,85 @@ openapi: 3.0.1 +paths: + /transferprocess/{processId}/complete: + post: + description: "Requests completion of the transfer process. Due to the asynchronous\ + \ nature of transfers, a successful response only indicates that the request\ + \ was successfully received" + operationId: complete + parameters: + - in: path + name: processId + required: true + schema: + type: string + example: null + responses: + "400": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + description: "Request was malformed, e.g. id was null" + tags: + - Transfer Process Control Api + /transferprocess/{processId}/fail: + post: + description: "Requests completion of the transfer process. Due to the asynchronous\ + \ nature of transfers, a successful response only indicates that the request\ + \ was successfully received" + operationId: fail + parameters: + - in: path + name: processId + required: true + schema: + type: string + example: null + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferProcessFailStateDto' + required: true + responses: + "400": + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + description: "Request was malformed, e.g. id was null" + tags: + - Transfer Process Control Api +components: + schemas: + ApiErrorDetail: + type: object + example: null + properties: + invalidValue: + type: string + example: null + message: + type: string + example: null + path: + type: string + example: null + type: + type: string + example: null + TransferProcessFailStateDto: + type: object + example: null + properties: + errorMessage: + type: string + example: null + required: + - errorMessage diff --git a/resources/openapi/yaml/data-plane-api.yaml b/resources/openapi/yaml/data-plane-api.yaml index 124ded091da..74d5b839470 100644 --- a/resources/openapi/yaml/data-plane-api.yaml +++ b/resources/openapi/yaml/data-plane-api.yaml @@ -1 +1,157 @@ openapi: 3.0.1 +tags: +- description: 'Api targeted by the Control Plane to delegate a data transfer (Provider + Push or Streaming) to the Data Plane after the contract has been successfully + negotiated and agreed between the two participants. ' + name: Data Plane control API +- description: "The public API of the Data Plane is a data proxy enabling a data consumer\ + \ to actively querydata from the provider data source (e.g. backend Rest API,\ + \ internal database...) through its Data Planeinstance. Thus the Data Plane is\ + \ the only entry/output door for the data, which avoids the provider to exposedirectly\ + \ its data externally.The Data Plane public API being a proxy, it supports all\ + \ verbs (i.e. GET, POST, PUT, PATCH, DELETE), whichcan then conveyed until the\ + \ data source is required. This is especially useful when the actual data sourceis\ + \ a Rest API itself.In the same manner, any set of arbitrary query parameters,\ + \ path parameters and request body are supported (in the limits fixed by the HTTP\ + \ server) and can also conveyed to the actual data source." + name: Data Plane public API +paths: + /transfer: + post: + description: Initiates a data transfer for the given request. The transfer will + be performed asynchronously. + operationId: initiateTransfer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataFlowRequest' + responses: + "200": + description: Data transfer initiated + "400": + description: Failed to validate request + tags: + - Data Plane control API + /transfer/{processId}: + get: + description: Get the current state of a data transfer. + operationId: getTransferState + parameters: + - in: path + name: processId + required: true + schema: + type: string + example: null + responses: + "200": + description: Missing access token + tags: + - Data Plane control API + /{any}: + delete: + description: Send `DELETE` data query to the Data Plane. + operationId: delete + responses: + "400": + description: Missing access token + "403": + description: Access token is expired or invalid + "500": + description: Failed to transfer data + tags: + - Data Plane public API + get: + description: Send `GET` data query to the Data Plane. + operationId: get + responses: + "400": + description: Missing access token + "403": + description: Access token is expired or invalid + "500": + description: Failed to transfer data + tags: + - Data Plane public API + patch: + description: Send `PATCH` data query to the Data Plane. + operationId: patch + responses: + "400": + description: Missing access token + "403": + description: Access token is expired or invalid + "500": + description: Failed to transfer data + tags: + - Data Plane public API + post: + description: Send `POST` data query to the Data Plane. + operationId: post + responses: + "400": + description: Missing access token + "403": + description: Access token is expired or invalid + "500": + description: Failed to transfer data + tags: + - Data Plane public API + put: + description: Send `PUT` data query to the Data Plane. + operationId: put + responses: + "400": + description: Missing access token + "403": + description: Access token is expired or invalid + "500": + description: Failed to transfer data + tags: + - Data Plane public API +components: + schemas: + DataAddress: + type: object + example: null + properties: + properties: + type: object + additionalProperties: + type: string + example: null + example: null + DataFlowRequest: + type: object + example: null + properties: + callbackAddress: + type: string + format: url + example: null + destinationDataAddress: + $ref: '#/components/schemas/DataAddress' + id: + type: string + example: null + processId: + type: string + example: null + properties: + type: object + additionalProperties: + type: string + example: null + example: null + sourceDataAddress: + $ref: '#/components/schemas/DataAddress' + traceContext: + type: object + additionalProperties: + type: string + example: null + example: null + trackable: + type: boolean + example: null diff --git a/resources/openapi/yaml/data-plane-selector-api.yaml b/resources/openapi/yaml/data-plane-selector-api.yaml new file mode 100644 index 00000000000..c919bdfa7bf --- /dev/null +++ b/resources/openapi/yaml/data-plane-selector-api.yaml @@ -0,0 +1,96 @@ +openapi: 3.0.1 +paths: + /instances: + get: + operationId: getAll + responses: + default: + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/DataPlaneInstance' + description: default response + tags: + - Dataplane Selector + post: + operationId: addEntry + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPlaneInstance' + responses: + default: + content: + application/json: {} + description: default response + tags: + - Dataplane Selector + /instances/select: + post: + operationId: find + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SelectionRequest' + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPlaneInstance' + description: default response + tags: + - Dataplane Selector +components: + schemas: + DataAddress: + type: object + example: null + properties: + properties: + type: object + additionalProperties: + type: string + example: null + example: null + DataPlaneInstance: + type: object + example: null + properties: + id: + type: string + example: null + lastActive: + type: integer + format: int64 + example: null + properties: + type: object + additionalProperties: + type: object + example: null + example: null + turnCount: + type: integer + format: int32 + example: null + url: + type: string + format: url + example: null + SelectionRequest: + type: object + example: null + properties: + destination: + $ref: '#/components/schemas/DataAddress' + source: + $ref: '#/components/schemas/DataAddress' + strategy: + type: string + example: null diff --git a/resources/openapi/yaml/data-plane-transfer-sync.yaml b/resources/openapi/yaml/data-plane-transfer-sync.yaml index 124ded091da..367f5cc0674 100644 --- a/resources/openapi/yaml/data-plane-transfer-sync.yaml +++ b/resources/openapi/yaml/data-plane-transfer-sync.yaml @@ -1 +1,36 @@ openapi: 3.0.1 +paths: + /token: + get: + description: "Checks that the provided token has been signed by the present\ + \ entity and asserts its validity. If token is valid, then the data address\ + \ contained in its claims is decrypted and returned back to the caller." + operationId: validate + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + example: null + responses: + "200": + description: Token is valid + "400": + description: Request was malformed + "403": + description: Token is invalid + tags: + - Token Validation +components: + schemas: + DataAddress: + type: object + example: null + properties: + properties: + type: object + additionalProperties: + type: string + example: null + example: null diff --git a/resources/openapi/yaml/federated-catalog-core.yaml b/resources/openapi/yaml/federated-catalog-core.yaml index 124ded091da..e82575b5259 100644 --- a/resources/openapi/yaml/federated-catalog-core.yaml +++ b/resources/openapi/yaml/federated-catalog-core.yaml @@ -1 +1,241 @@ openapi: 3.0.1 +paths: + /federatedcatalog: + post: + operationId: getCachedCatalog + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FederatedCatalogCacheQuery' + responses: + default: + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ContractOffer' + description: default response +components: + schemas: + Action: + type: object + example: null + properties: + constraint: + $ref: '#/components/schemas/Constraint' + includedIn: + type: string + example: null + type: + type: string + example: null + Asset: + type: object + example: null + properties: + createdAt: + type: integer + format: int64 + example: null + id: + type: string + example: null + properties: + type: object + additionalProperties: + type: object + example: null + example: null + Constraint: + type: object + discriminator: + propertyName: edctype + example: null + properties: + edctype: + type: string + example: null + required: + - edctype + ContractOffer: + type: object + example: null + properties: + asset: + $ref: '#/components/schemas/Asset' + consumer: + type: string + format: uri + example: null + contractEnd: + type: string + format: date-time + example: null + contractStart: + type: string + format: date-time + example: null + id: + type: string + example: null + offerEnd: + type: string + format: date-time + example: null + offerStart: + type: string + format: date-time + example: null + policy: + $ref: '#/components/schemas/Policy' + provider: + type: string + format: uri + example: null + Criterion: + type: object + example: null + properties: + operandLeft: + type: object + example: null + operandRight: + type: object + example: null + operator: + type: string + example: null + Duty: + type: object + example: null + properties: + action: + $ref: '#/components/schemas/Action' + assignee: + type: string + example: null + assigner: + type: string + example: null + consequence: + $ref: '#/components/schemas/Duty' + constraints: + type: array + example: null + items: + $ref: '#/components/schemas/Constraint' + parentPermission: + $ref: '#/components/schemas/Permission' + target: + type: string + example: null + uid: + type: string + example: null + FederatedCatalogCacheQuery: + type: object + example: null + properties: + criteria: + type: array + example: null + items: + $ref: '#/components/schemas/Criterion' + Permission: + type: object + example: null + properties: + action: + $ref: '#/components/schemas/Action' + assignee: + type: string + example: null + assigner: + type: string + example: null + constraints: + type: array + example: null + items: + $ref: '#/components/schemas/Constraint' + duties: + type: array + example: null + items: + $ref: '#/components/schemas/Duty' + target: + type: string + example: null + uid: + type: string + example: null + Policy: + type: object + example: null + properties: + '@type': + type: string + enum: + - SET + - OFFER + - CONTRACT + example: null + assignee: + type: string + example: null + assigner: + type: string + example: null + extensibleProperties: + type: object + additionalProperties: + type: object + example: null + example: null + inheritsFrom: + type: string + example: null + obligations: + type: array + example: null + items: + $ref: '#/components/schemas/Duty' + permissions: + type: array + example: null + items: + $ref: '#/components/schemas/Permission' + prohibitions: + type: array + example: null + items: + $ref: '#/components/schemas/Prohibition' + target: + type: string + example: null + Prohibition: + type: object + example: null + properties: + action: + $ref: '#/components/schemas/Action' + assignee: + type: string + example: null + assigner: + type: string + example: null + constraints: + type: array + example: null + items: + $ref: '#/components/schemas/Constraint' + target: + type: string + example: null + uid: + type: string + example: null diff --git a/resources/openapi/yaml/policydefinition-api.yaml b/resources/openapi/yaml/policy-definition-api.yaml similarity index 83% rename from resources/openapi/yaml/policydefinition-api.yaml rename to resources/openapi/yaml/policy-definition-api.yaml index 6f5c7c322a3..e9362045575 100644 --- a/resources/openapi/yaml/policydefinition-api.yaml +++ b/resources/openapi/yaml/policy-definition-api.yaml @@ -11,15 +11,18 @@ paths: schema: type: integer format: int32 + example: null - in: query name: limit schema: type: integer format: int32 + example: null - in: query name: filter schema: type: string + example: null - in: query name: sort schema: @@ -27,16 +30,19 @@ paths: enum: - ASC - DESC + example: null - in: query name: sortField schema: type: string + example: null responses: "200": content: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/PolicyDefinitionResponseDto' "400": @@ -44,6 +50,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request was malformed @@ -70,6 +77,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request body was malformed @@ -78,6 +86,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Could not create policy definition, because a contract definition\ @@ -99,6 +108,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/PolicyDefinitionResponseDto' "400": @@ -106,6 +116,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request was malformed @@ -125,6 +136,7 @@ paths: required: true schema: type: string + example: null responses: "200": description: Policy definition was deleted successfully @@ -133,6 +145,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -141,6 +154,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: An policy definition with the given ID does not exist @@ -149,6 +163,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "The policy definition cannot be deleted, because it is referenced\ @@ -164,6 +179,7 @@ paths: required: true schema: type: string + example: null responses: "200": content: @@ -176,6 +192,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -184,6 +201,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: An policy definition with the given ID does not exist @@ -193,97 +211,128 @@ components: schemas: Action: type: object + example: null properties: constraint: $ref: '#/components/schemas/Constraint' includedIn: type: string + example: null type: type: string + example: null ApiErrorDetail: type: object + example: null properties: invalidValue: type: string + example: null message: type: string + example: null path: type: string + example: null type: type: string + example: null Constraint: type: object discriminator: propertyName: edctype + example: null properties: edctype: type: string + example: null required: - edctype CriterionDto: type: object + example: null properties: operandLeft: type: object + example: null operandRight: type: object + example: null operator: type: string + example: null required: - operandLeft - operator Duty: type: object + example: null properties: action: $ref: '#/components/schemas/Action' assignee: type: string + example: null assigner: type: string + example: null consequence: $ref: '#/components/schemas/Duty' constraints: type: array + example: null items: $ref: '#/components/schemas/Constraint' parentPermission: $ref: '#/components/schemas/Permission' target: type: string + example: null uid: type: string + example: null IdResponseDto: type: object + example: null properties: createdAt: type: integer format: int64 + example: null id: type: string + example: null Permission: type: object + example: null properties: action: $ref: '#/components/schemas/Action' assignee: type: string + example: null assigner: type: string + example: null constraints: type: array + example: null items: $ref: '#/components/schemas/Constraint' duties: type: array + example: null items: $ref: '#/components/schemas/Duty' target: type: string + example: null uid: type: string + example: null Policy: type: object + example: null properties: '@type': type: string @@ -291,87 +340,115 @@ components: - SET - OFFER - CONTRACT + example: null assignee: type: string + example: null assigner: type: string + example: null extensibleProperties: type: object additionalProperties: type: object + example: null + example: null inheritsFrom: type: string + example: null obligations: type: array + example: null items: $ref: '#/components/schemas/Duty' permissions: type: array + example: null items: $ref: '#/components/schemas/Permission' prohibitions: type: array + example: null items: $ref: '#/components/schemas/Prohibition' target: type: string + example: null PolicyDefinitionRequestDto: type: object + example: null properties: id: type: string + example: null policy: $ref: '#/components/schemas/Policy' required: - policy PolicyDefinitionResponseDto: type: object + example: null properties: createdAt: type: integer format: int64 + example: null id: type: string + example: null policy: $ref: '#/components/schemas/Policy' required: - policy Prohibition: type: object + example: null properties: action: $ref: '#/components/schemas/Action' assignee: type: string + example: null assigner: type: string + example: null constraints: type: array + example: null items: $ref: '#/components/schemas/Constraint' target: type: string + example: null uid: type: string + example: null QuerySpecDto: type: object + example: null properties: filter: type: string + example: null filterExpression: type: array + example: null items: $ref: '#/components/schemas/CriterionDto' limit: type: integer format: int32 + example: null offset: type: integer format: int32 + example: null sortField: type: string + example: null sortOrder: type: string enum: - ASC - DESC + example: null diff --git a/resources/openapi/yaml/provision-http.yaml b/resources/openapi/yaml/provision-http.yaml new file mode 100644 index 00000000000..5b76326dbd8 --- /dev/null +++ b/resources/openapi/yaml/provision-http.yaml @@ -0,0 +1,101 @@ +openapi: 3.0.1 +paths: + /callback/{processId}/deprovision: + post: + operationId: callDeprovisionWebhook + parameters: + - in: path + name: processId + required: true + schema: + type: string + example: null + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeprovisionedResource' + responses: + default: + content: + application/json: {} + description: default response + tags: + - HTTP Provisioner Webhook + /callback/{processId}/provision: + post: + operationId: callProvisionWebhook + parameters: + - in: path + name: processId + required: true + schema: + type: string + example: null + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProvisionerWebhookRequest' + responses: + default: + content: + application/json: {} + description: default response + tags: + - HTTP Provisioner Webhook +components: + schemas: + DataAddress: + type: object + example: null + properties: + properties: + type: object + additionalProperties: + type: string + example: null + example: null + DeprovisionedResource: + type: object + example: null + properties: + error: + type: boolean + example: null + errorMessage: + type: string + example: null + inProcess: + type: boolean + example: null + provisionedResourceId: + type: string + example: null + ProvisionerWebhookRequest: + type: object + example: null + properties: + apiKeyJwt: + type: string + example: null + assetId: + type: string + example: null + contentDataAddress: + $ref: '#/components/schemas/DataAddress' + hasToken: + type: boolean + example: null + resourceDefinitionId: + type: string + example: null + resourceName: + type: string + example: null + required: + - apiKeyJwt + - assetId + - contentDataAddress + - resourceDefinitionId + - resourceName diff --git a/resources/openapi/yaml/provision-oauth2.yaml b/resources/openapi/yaml/provision-oauth2.yaml new file mode 100644 index 00000000000..124ded091da --- /dev/null +++ b/resources/openapi/yaml/provision-oauth2.yaml @@ -0,0 +1 @@ +openapi: 3.0.1 diff --git a/resources/openapi/yaml/transferprocess-api.yaml b/resources/openapi/yaml/transfer-process-api.yaml similarity index 85% rename from resources/openapi/yaml/transferprocess-api.yaml rename to resources/openapi/yaml/transfer-process-api.yaml index 4564565589b..cd49f1b54a9 100644 --- a/resources/openapi/yaml/transferprocess-api.yaml +++ b/resources/openapi/yaml/transfer-process-api.yaml @@ -11,15 +11,18 @@ paths: schema: type: integer format: int32 + example: null - in: query name: limit schema: type: integer format: int32 + example: null - in: query name: filter schema: type: string + example: null - in: query name: sort schema: @@ -27,16 +30,19 @@ paths: enum: - ASC - DESC + example: null - in: query name: sortField schema: type: string + example: null responses: "200": content: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/TransferProcessDto' "400": @@ -44,6 +50,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request was malformed @@ -77,6 +84,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request body was malformed @@ -97,6 +105,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/TransferProcessDto' "400": @@ -104,6 +113,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: Request was malformed @@ -119,6 +129,7 @@ paths: required: true schema: type: string + example: null responses: "200": content: @@ -131,6 +142,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -139,6 +151,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: A transfer process with the given ID does not exist @@ -157,6 +170,7 @@ paths: required: true schema: type: string + example: null responses: "200": description: Request to cancel the transfer process was successfully received @@ -168,6 +182,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -176,6 +191,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: A contract negotiation with the given ID does not exist @@ -195,6 +211,7 @@ paths: required: true schema: type: string + example: null responses: "200": description: Request to deprovision the transfer process was successfully @@ -207,6 +224,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -215,6 +233,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: A contract negotiation with the given ID does not exist @@ -230,6 +249,7 @@ paths: required: true schema: type: string + example: null responses: "200": content: @@ -242,6 +262,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: "Request was malformed, e.g. id was null" @@ -250,6 +271,7 @@ paths: application/json: schema: type: array + example: null items: $ref: '#/components/schemas/ApiErrorDetail' description: An transfer process with the given ID does not exist @@ -259,129 +281,177 @@ components: schemas: ApiErrorDetail: type: object + example: null properties: invalidValue: type: string + example: null message: type: string + example: null path: type: string + example: null type: type: string + example: null CriterionDto: type: object + example: null properties: operandLeft: type: object + example: null operandRight: type: object + example: null operator: type: string + example: null required: - operandLeft - operator DataAddress: type: object + example: null properties: properties: type: object additionalProperties: type: string + example: null + example: null DataAddressInformationDto: type: object + example: null properties: properties: type: object additionalProperties: type: string + example: null + example: null DataRequestDto: type: object + example: null properties: assetId: type: string + example: null connectorId: type: string + example: null contractId: type: string + example: null id: type: string + example: null IdResponseDto: type: object + example: null properties: createdAt: type: integer format: int64 + example: null id: type: string + example: null QuerySpecDto: type: object + example: null properties: filter: type: string + example: null filterExpression: type: array + example: null items: $ref: '#/components/schemas/CriterionDto' limit: type: integer format: int32 + example: null offset: type: integer format: int32 + example: null sortField: type: string + example: null sortOrder: type: string enum: - ASC - DESC + example: null TransferProcessDto: type: object + example: null properties: createdAt: type: integer format: int64 + example: null dataDestination: $ref: '#/components/schemas/DataAddressInformationDto' dataRequest: $ref: '#/components/schemas/DataRequestDto' errorDetail: type: string + example: null id: type: string + example: null state: type: string + example: null stateTimestamp: type: integer format: int64 + example: null type: type: string + example: null updatedAt: type: integer format: int64 + example: null TransferRequestDto: type: object + example: null properties: assetId: type: string + example: null connectorAddress: type: string + example: null connectorId: type: string + example: null contractId: type: string + example: null dataDestination: $ref: '#/components/schemas/DataAddress' id: type: string + example: null managedResources: type: boolean + example: null properties: type: object additionalProperties: type: string + example: null + example: null protocol: type: string + example: null transferType: $ref: '#/components/schemas/TransferType' required: @@ -394,13 +464,18 @@ components: - transferType TransferState: type: object + example: null properties: state: type: string + example: null TransferType: type: object + example: null properties: contentType: type: string + example: null isFinite: type: boolean + example: null