Skip to content

Commit

Permalink
Merge pull request #137 from catenax-ng/docs/generate_openapi_spec
Browse files Browse the repository at this point in the history
docs: generate OpenApi spec
  • Loading branch information
SebastianBezold authored Mar 30, 2023
2 parents 85a9711 + b67df83 commit 6707719
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions edc-extensions/control-plane-adapter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
plugins {
`java-library`
`maven-publish`
id("io.swagger.core.v3.swagger-gradle-plugin")
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import static java.util.Objects.isNull;

import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
Expand All @@ -35,6 +36,7 @@
@Produces({MediaType.APPLICATION_JSON})
@Path("/adapter/asset")
@RequiredArgsConstructor
@Tag(name = "Control Plane Adapter")
public class HttpController {
private final Monitor monitor;
private final ResultService resultService;
Expand Down
40 changes: 40 additions & 0 deletions resources/openapi/yaml/control-plane-adapter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
openapi: 3.0.1
paths:
/adapter/asset/sync/{assetId}:
get:
operationId: getAssetSynchronous
parameters:
- in: path
name: assetId
required: true
schema:
type: string
example: null
- in: query
name: providerUrl
schema:
type: string
example: null
- in: query
name: contractAgreementId
schema:
type: string
example: null
- in: query
name: contractAgreementReuse
schema:
type: boolean
default: true
example: null
- in: query
name: timeout
schema:
type: string
example: null
responses:
default:
content:
application/json: {}
description: default response
tags:
- Control Plane Adapter

0 comments on commit 6707719

Please sign in to comment.