From 511fde2b77ddff54c1ea11bc983daf5bd4731570 Mon Sep 17 00:00:00 2001 From: Andrej Petras Date: Wed, 23 Oct 2024 13:47:07 +0200 Subject: [PATCH] feat: move permission v1 api to product repository (#103) --- .../pages/openapi/onecx-permission-v1.adoc | 2 +- pom.xml | 22 ++-- src/main/openapi/onecx-permission-v1.yaml | 112 ------------------ 3 files changed, 13 insertions(+), 123 deletions(-) delete mode 100644 src/main/openapi/onecx-permission-v1.yaml diff --git a/docs/modules/onecx-permission-svc/pages/openapi/onecx-permission-v1.adoc b/docs/modules/onecx-permission-svc/pages/openapi/onecx-permission-v1.adoc index f6f0091..ce9f989 100644 --- a/docs/modules/onecx-permission-svc/pages/openapi/onecx-permission-v1.adoc +++ b/docs/modules/onecx-permission-svc/pages/openapi/onecx-permission-v1.adoc @@ -1,2 +1,2 @@ :page-layout: swagger -:page-swagger-url: https://raw.githubusercontent.com/onecx/onecx-permission-svc/main/src/main/openapi/onecx-permission-v1.yaml +:page-swagger-url: https://raw.githubusercontent.com/onecx/onecx-permission/main/openapi/onecx-permission-v1.yaml diff --git a/pom.xml b/pom.xml index 488244e..ac9cda3 100644 --- a/pom.xml +++ b/pom.xml @@ -164,20 +164,22 @@ - org.tkit.maven - tkit-docs-quarkus-plugin + com.googlecode.maven-download-plugin + download-maven-plugin - docs - prepare-package + onecx-tenant-resolver-v1 + initialize - docs + wget - ${skipDocs} - - onecx-permission-v1.yaml - + + https://raw.githubusercontent.com/onecx/onecx-permission/main/openapi/onecx-permission-v1.yaml + + target/tmp/openapi + onecx-permission-v1.yaml + false @@ -267,7 +269,7 @@ generate - src/main/openapi/onecx-permission-v1.yaml + target/tmp/openapi/onecx-permission-v1.yaml gen.org.tkit.onecx.permission.rs.external.v1 gen.org.tkit.onecx.permission.rs.external.v1.model DTOV1 diff --git a/src/main/openapi/onecx-permission-v1.yaml b/src/main/openapi/onecx-permission-v1.yaml deleted file mode 100644 index b3eb9b7..0000000 --- a/src/main/openapi/onecx-permission-v1.yaml +++ /dev/null @@ -1,112 +0,0 @@ ---- -openapi: 3.0.3 -info: - title: onecx-permission service - version: 1.0.0 -servers: - - url: "http://onecx-permission-svc:8080" -tags: - - name: permission -paths: - /v1/permissions/user/{productName}/{appId}: - post: - security: - - oauth2: [ ocx-pm:read ] - tags: - - permission - description: Get permissions of the product application for the user - operationId: getApplicationPermissions - parameters: - - name: productName - in: path - description: Product name - required: true - schema: - type: string - - name: appId - in: path - description: Application ID - required: true - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PermissionRequest' - responses: - 200: - description: Permission updated - content: - application/json: - schema: - $ref: '#/components/schemas/ApplicationPermissions' - 400: - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetailResponse' -components: - securitySchemes: - oauth2: - type: oauth2 - flows: - clientCredentials: - tokenUrl: https://oauth.simple.api/token - scopes: - ocx-pm:read: Grants read access - schemas: - PermissionRequest: - type: object - required: - - token - properties: - token: - type: string - ApplicationPermissions: - type: object - properties: - appId: - type: string - productName: - type: string - permissions: - type: object - nullable: false - description: resources - additionalProperties: - type: array - items: - type: string - uniqueItems: true - ProblemDetailResponse: - type: object - properties: - errorCode: - type: string - detail: - type: string - params: - type: array - items: - $ref: '#/components/schemas/ProblemDetailParam' - invalidParams: - type: array - items: - $ref: '#/components/schemas/ProblemDetailInvalidParam' - ProblemDetailParam: - type: object - properties: - key: - type: string - value: - type: string - ProblemDetailInvalidParam: - type: object - properties: - name: - type: string - message: - type: string