From dd048d306bfbb1539cc214abf6f7ad34a576b7c2 Mon Sep 17 00:00:00 2001 From: ElisKina-dev Date: Wed, 4 Dec 2024 10:38:43 +0100 Subject: [PATCH] openapi file --- build.gradle.kts | 2 +- openapi/p4pa-pu-bff.openapi.yaml | 106 ++++++++++++++++++ ...late-payments-java-repository.openapi.yaml | 31 ----- 3 files changed, 107 insertions(+), 32 deletions(-) create mode 100644 openapi/p4pa-pu-bff.openapi.yaml delete mode 100644 openapi/template-payments-java-repository.openapi.yaml diff --git a/build.gradle.kts b/build.gradle.kts index e338231..2b8bff5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -97,7 +97,7 @@ springBoot { openApiGenerate { generatorName.set("spring") - inputSpec.set("$rootDir/openapi/template-payments-java-repository.openapi.yaml") + inputSpec.set("$rootDir/openapi/p4pa-pu-bff.openapi.yaml") outputDir.set("$projectDir/build/generated") apiPackage.set("it.gov.pagopa.template.controller.generated") modelPackage.set("it.gov.pagopa.template.model.generated") diff --git a/openapi/p4pa-pu-bff.openapi.yaml b/openapi/p4pa-pu-bff.openapi.yaml new file mode 100644 index 0000000..2834d94 --- /dev/null +++ b/openapi/p4pa-pu-bff.openapi.yaml @@ -0,0 +1,106 @@ +openapi: 3.0.1 +info: + title: API Documentation + description: OpenAPI documentation + version: 1.0.0 +servers: + - url: "http://localhost:8080" + description: Generated server url +paths: + /organizations: + get: + tags: + - Organizations + summary: "Retrieve the list of organizations" + operationId: getOrganizations + security: + - bearerAuth: [ ] + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OrganizationDTO' + '401': + description: Unauthorized - Missing or invalid token + '403': + description: Forbidden - Access denied + '500': + description: Internal Server Error + /info/brokerConfig: + get: + tags: + - ConfigFe + summary: "Retrieve application information for FE" + operationId: getBrokerConfig + security: + - bearerAuth: [ ] + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigFE' + '401': + description: Unauthorized - Missing or invalid token + '403': + description: Forbidden - Access denied + '500': + description: Internal Server Error +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + OrganizationDTO: + type: object + properties: + orgId: + type: string + description: Organization ID + name: + type: string + description: Organization name + role: + type: string + description: Organization role + logo: + type: string + format: base64 + description: Base64 encoded logo of the organization + ConfigFE: + type: object + properties: + headerAssistanceUrl: + type: string + description: URL for header assistance + logoFooterImg: + type: string + description: URL for footer logo image + footerDescText: + type: string + description: Description text for the footer + footerPrivacyInfoUrl: + type: string + description: URL for privacy information in the footer + footerGDPRUrl: + type: string + description: URL for GDPR information in the footer + footerTermsCondUrl: + type: string + description: URL for terms and conditions in the footer + footerAccessibilityUrl: + type: string + description: URL for accessibility information in the footer + brokerId: + type: string + description: Broker ID + canManageUsers: + type: boolean + description: Indicates if the user can manage other users diff --git a/openapi/template-payments-java-repository.openapi.yaml b/openapi/template-payments-java-repository.openapi.yaml deleted file mode 100644 index 7f5b1c0..0000000 --- a/openapi/template-payments-java-repository.openapi.yaml +++ /dev/null @@ -1,31 +0,0 @@ -openapi: 3.1.0 -info: - title: Fake API - description: "Sample API" - version: "1.0.0" -paths: - /api/v1/greet: - get: - summary: "Hello World" - description: "Sample endpoint that return greetings" - responses: - '200': - description: "Success" - content: - application/json: - schema: - type: object - properties: - message: - type: string - example: "Hello, World!" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - type: object - properties: - error: - type: string - example: "Internal Server Error"