aboutsummaryrefslogtreecommitdiffstats
path: root/openapi
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:44:19 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:44:19 +0000
commitcdc670c5a1c25b0b0ab460b1711a0a42f270b1f3 (patch)
tree41ac6c0e7a52505fd1d0de057df6d5328a853cd0 /openapi
parent1a9b563662e9a9dd1f89e04ce0026e2cc5c4771d (diff)
Upload bff
Issue-ID: PORTAL-1083 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I50f0a2db2dab28354c32c1ebf5a5e22afb0faade
Diffstat (limited to 'openapi')
-rw-r--r--openapi/build.gradle27
-rw-r--r--openapi/client-portal-history/LICENSE201
-rw-r--r--openapi/client-portal-history/build.gradle25
-rw-r--r--openapi/client-portal-history/src/portal_history_openapi.yaml457
-rw-r--r--openapi/client-portal-keycloak/LICENSE201
-rw-r--r--openapi/client-portal-keycloak/build.gradle25
-rw-r--r--openapi/client-portal-keycloak/src/portal_keycloak_openapi.yaml651
-rw-r--r--openapi/client-portal-prefs/LICENSE201
-rw-r--r--openapi/client-portal-prefs/build.gradle25
-rw-r--r--openapi/client-portal-prefs/src/portal_prefs_openapi.yaml341
-rw-r--r--openapi/server/LICENSE201
-rw-r--r--openapi/server/build.gradle48
-rw-r--r--openapi/server/src/main/resources/static/api-docs.html20
-rw-r--r--openapi/server/src/main/resources/static/api.yaml969
14 files changed, 3392 insertions, 0 deletions
diff --git a/openapi/build.gradle b/openapi/build.gradle
new file mode 100644
index 0000000..ee9ac96
--- /dev/null
+++ b/openapi/build.gradle
@@ -0,0 +1,27 @@
+apply plugin: 'org.openapi.generator'
+
+void createOpenApiGenerateClientTask(Project project, String apiDefinition, String packageName, String dtoSuffix) {
+ String taskName = "openApiGenerate_$packageName"
+ tasks.create(taskName, org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
+ generatorName = "java"
+ library = "webclient"
+ inputSpec = "${project.projectDir}/src/$apiDefinition".toString()
+ outputDir = "${project.buildDir}/openapi".toString()
+ configOptions = [
+ openApiNullable : "false",
+ dateLibrary : "java8",
+ serializationLibrary: "jackson"
+ ]
+ typeMappings = [
+ "File": "org.springframework.core.io.buffer.DataBuffer"
+ ]
+ generateApiTests = false
+ generateApiDocumentation = false
+ generateModelTests = false
+ generateModelDocumentation = false
+ invokerPackage = "org.onap.portal.bff.openapi.$packageName"
+ apiPackage = "org.onap.portal.bff.openapi.${packageName}.api"
+ modelPackage = "org.onap.portal.bff.openapi.${packageName}.model"
+ modelNameSuffix = dtoSuffix
+ }
+}
diff --git a/openapi/client-portal-history/LICENSE b/openapi/client-portal-history/LICENSE
new file mode 100644
index 0000000..abe3069
--- /dev/null
+++ b/openapi/client-portal-history/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2021 TNAP / development / system-team
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/openapi/client-portal-history/build.gradle b/openapi/client-portal-history/build.gradle
new file mode 100644
index 0000000..1872713
--- /dev/null
+++ b/openapi/client-portal-history/build.gradle
@@ -0,0 +1,25 @@
+apply plugin: 'org.openapi.generator'
+
+dependencies {
+ implementation "org.springframework.boot:spring-boot-starter-webflux"
+ implementation "org.openapitools:openapi-generator:$openapiVersion"
+}
+
+compileJava {
+ createOpenApiGenerateClientTask(project, "portal_history_openapi.yaml", "client_portal_history", "PortalHistoryDto")
+ dependsOn = [':openapi:openApiGenerate_client_portal_history']
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs += file("$buildDir/openapi/src/main/java")
+ }
+ }
+}
+
+idea {
+ module {
+ generatedSourceDirs += file("$buildDir/openapi/src/main/java")
+ }
+}
diff --git a/openapi/client-portal-history/src/portal_history_openapi.yaml b/openapi/client-portal-history/src/portal_history_openapi.yaml
new file mode 100644
index 0000000..5057592
--- /dev/null
+++ b/openapi/client-portal-history/src/portal_history_openapi.yaml
@@ -0,0 +1,457 @@
+openapi: 3.0.2
+info:
+ title: Config API
+ version: '1.0'
+ description: API to provide actions for portal-history
+ contact:
+ name: TNAP Team Tesla
+ url: 'https://www.telekom.de'
+ email: info@telekom.de
+servers:
+ - url: 'http://localhost:9002'
+tags:
+ - name: actions
+paths:
+ '/v1/actions/{userId}':
+ parameters:
+ - $ref: '#/components/parameters/userIdPathParam'
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ get:
+ summary: Retrieve all actions for a specific user
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ActionsListResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ operationId: getActions
+ parameters:
+ - $ref: '#/components/parameters/pageQueryParam'
+ - $ref: '#/components/parameters/pageSizeQueryParam'
+ - schema:
+ type: integer
+ format: int32
+ in: query
+ name: showLastHours
+ description: Get all actions within the last X hours.
+ description: Get actions for the given userId
+ tags:
+ - actions
+ post:
+ summary: Create an action for a given user
+ operationId: createAction
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ActionResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateActionRequest'
+ description: Only one action in each POST request
+ description: Create a user action
+ tags:
+ - actions
+ delete:
+ summary: Delete user actions after given time
+ operationId: deleteActions
+ parameters:
+ - schema:
+ type: integer
+ format: int32
+ in: query
+ name: deleteAfterHours
+ description: If parameter is given actions older than value will be deleted for the user
+ required: true
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ tags:
+ - actions
+ description: Delete user actions after given time
+ '/v1/actions':
+ get:
+ summary: Retrieve all actions from the portal with an optional timeframe
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ActionsListResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ operationId: listActions
+ parameters:
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ - $ref: '#/components/parameters/pageQueryParam'
+ - $ref: '#/components/parameters/pageSizeQueryParam'
+ - schema:
+ type: integer
+ format: int32
+ in: query
+ name: showLastHours
+ description: Get all actions within the last X hours.
+ description: Get portal actions from all users
+ tags:
+ - actions
+ '/actuator/info':
+ get:
+ tags:
+ - actions
+ summary: Retrieve actuator information
+ description: Proxy for actuator info endpoint
+ operationId: getActuatorInfo
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ActuatorInfoResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+
+components:
+ parameters:
+ xRequestIdHeader:
+ name: X-Request-Id
+ in: header
+ description: The unique identifier of the request
+ required: true
+ schema:
+ type: string
+ pageQueryParam:
+ name: page
+ in: query
+ description: Page index (1..N)
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ default: 1
+ pageSizeQueryParam:
+ name: pageSize
+ in: query
+ description: The size of the page to be returned
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 5000
+ default: 10
+ userIdPathParam:
+ name: userId
+ in: path
+ description: User ID
+ required: true
+ schema:
+ $ref: '#/components/schemas/ValidString'
+ schemas:
+ ActionResponse:
+ title: ActionResponse
+ type: object
+ properties:
+ actionCreatedAt:
+ type: string
+ format: date-time
+ action:
+ type: object
+ saveInterval:
+ type: integer
+ format: int32
+ required:
+ - action
+ - actionCreatedAt
+ CreateActionRequest:
+ title: CreateActionRequest
+ type: object
+ properties:
+ userId:
+ type: string
+ actionCreatedAt:
+ type: string
+ format: date-time
+ action:
+ type: object
+ required:
+ - userId
+ - actionCreatedAt
+ - action
+ ActionsListResponse:
+ title: ActionsListResponse
+ type: object
+ properties:
+ actionsList:
+ type: array
+ items:
+ $ref: '#/components/schemas/ActionResponse'
+ totalCount:
+ type: integer
+ format: int32
+ description: Total number of items matching criteria
+ required:
+ - actionsList
+ - totalCount
+ ActuatorInfoResponse:
+ title: ActuatorInfoResponse
+ type: object
+ properties:
+ git:
+ $ref: '#/components/schemas/ActuatorGitInfo'
+ build:
+ $ref: '#/components/schemas/ActuatorBuildInfo'
+ java:
+ $ref: '#/components/schemas/ActuatorJavaInfo'
+ ActuatorGitInfo:
+ title: ActuatorGitInfo
+ type: object
+ properties:
+ branch:
+ type: string
+ commit:
+ $ref: '#/components/schemas/GitCommitInfo'
+ ActuatorBuildInfo:
+ title: ActuatorBuildInfo
+ type: object
+ properties:
+ artifact:
+ type: string
+ name:
+ type: string
+ time:
+ type: string
+ version:
+ type: string
+ group:
+ type: string
+ GitCommitInfo:
+ title: GitCommitInfo
+ type: object
+ properties:
+ id:
+ type: string
+ time:
+ type: string
+ ActuatorJavaInfo:
+ title: ActuatorJavaInfo
+ type: object
+ properties:
+ version:
+ type: string
+ vendor:
+ $ref: '#/components/schemas/JavaVendorInfo'
+ runtime:
+ $ref: '#/components/schemas/JavaRuntimeInfo'
+ jvm:
+ $ref: '#/components/schemas/JavaJvmInfo'
+ JavaVendorInfo:
+ title: JavaVendorInfo
+ type: object
+ properties:
+ name:
+ type: string
+ version:
+ type: string
+ JavaRuntimeInfo:
+ title: JavaRuntimeInfo
+ type: object
+ properties:
+ name:
+ type: string
+ version:
+ type: string
+ JavaJvmInfo:
+ title: JavaJvmInfo
+ type: object
+ properties:
+ name:
+ type: string
+ vendor:
+ type: string
+ version:
+ type: string
+ Problem:
+ type: object
+ properties:
+ type:
+ type: string
+ format: uri-reference
+ description: |
+ A URI reference that uniquely identifies the problem type only in the context of the provided API. Opposed to the specification in RFC-7807, it is neither recommended to be dereferencable and point to a human-readable documentation nor globally unique for the problem type.
+ default: 'about:blank'
+ example: /problem/connection-error
+ title:
+ type: string
+ description: |
+ A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
+ example: Service Unavailable
+ status:
+ type: integer
+ format: int32
+ description: |
+ The HTTP status code generated by the origin server for this occurrence of the problem.
+ minimum: 100
+ maximum: 600
+ exclusiveMaximum: true
+ example: 503
+ detail:
+ type: string
+ description: |
+ A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
+ example: Connection to database timed out
+ instance:
+ type: string
+ format: uri-reference
+ description: |
+ A URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
+ example: /problem/connection-error#token-info-read-timed-out
+ ValidString:
+ type: string
+ pattern: '[\w,/!=§#@€:µ.*+?'' \-\u00C0-\u017F]*'
+ responses:
+ BadRequest:
+ description: '400: Bad Request'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ Unauthorized:
+ description: '401: Unauthorized'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ Forbidden:
+ description: '403: Forbidden'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ NotFound:
+ description: '404: Not Found'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ NotAllowed:
+ description: '405: Method Not Allowed'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ Conflict:
+ description: '409: Conflict'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ InternalServerError:
+ description: Internal Server Error
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ BadGateway:
+ description: Bad Gateway
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
diff --git a/openapi/client-portal-keycloak/LICENSE b/openapi/client-portal-keycloak/LICENSE
new file mode 100644
index 0000000..abe3069
--- /dev/null
+++ b/openapi/client-portal-keycloak/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2021 TNAP / development / system-team
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/openapi/client-portal-keycloak/build.gradle b/openapi/client-portal-keycloak/build.gradle
new file mode 100644
index 0000000..f01cf4b
--- /dev/null
+++ b/openapi/client-portal-keycloak/build.gradle
@@ -0,0 +1,25 @@
+apply plugin: 'org.openapi.generator'
+
+dependencies {
+ implementation "org.springframework.boot:spring-boot-starter-webflux"
+ implementation "org.openapitools:openapi-generator:$openapiVersion"
+}
+
+compileJava {
+ createOpenApiGenerateClientTask(project, "portal_keycloak_openapi.yaml", "client_portal_keycloak", "KeycloakDto")
+ dependsOn = [':openapi:openApiGenerate_client_portal_keycloak']
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs += file("$buildDir/openapi/src/main/java")
+ }
+ }
+}
+
+idea {
+ module {
+ generatedSourceDirs += file("$buildDir/openapi/src/main/java")
+ }
+}
diff --git a/openapi/client-portal-keycloak/src/portal_keycloak_openapi.yaml b/openapi/client-portal-keycloak/src/portal_keycloak_openapi.yaml
new file mode 100644
index 0000000..a09f0f4
--- /dev/null
+++ b/openapi/client-portal-keycloak/src/portal_keycloak_openapi.yaml
@@ -0,0 +1,651 @@
+openapi: 3.0.2
+info:
+ title: Keycloak API
+ version: '1.0'
+ description: API to provide Keycloak actions
+ contact:
+ name: TNAP Team Tesla
+ url: 'https://www.telekom.de'
+ email: info@telekom.de
+servers:
+ - url: 'http://localhost:9003/{base}/{version}'
+ variables:
+ base:
+ default: 'portal-keycloak'
+ description: Basepath
+ version:
+ default: 'v1'
+ description: Version
+paths:
+ '/roles':
+ get:
+ tags:
+ - keycloak
+ summary: Get all roles
+ description: Retrieves all keycloak roles for the realm or client
+ operationId: getRoles
+ parameters:
+ - name: search
+ in: query
+ schema:
+ type: string
+ - name: first
+ in: query
+ schema:
+ type: integer
+ format: int32
+ - name: max
+ in: query
+ schema:
+ type: integer
+ format: int32
+ - name: briefRepresentation
+ in: query
+ schema:
+ type: boolean
+ responses:
+ 2XX:
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Role'
+ post:
+ tags:
+ - keycloak
+ summary: Create a new role
+ description: Creates a new role for the realm or client
+ operationId: createRole
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Role'
+ required: true
+ responses:
+ 2XX:
+ description: OK
+ '/roles/{roleName}/users':
+ get:
+ tags:
+ - keycloak
+ summary: Get all users for the role
+ description: Returns a stream of users that have the specified role name
+ operationId: getUsersByRole
+ parameters:
+ - name: first
+ in: query
+ description: 'First result to return. Ignored if negative or {@code null}'
+ schema:
+ type: integer
+ format: int32
+ - name: max
+ in: query
+ description: 'Maximum number of results to return. Ignored if negative or {@code null}'
+ schema:
+ type: integer
+ format: int32
+ responses:
+ 2XX:
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/User'
+ parameters:
+ - name: roleName
+ in: path
+ description: The role name
+ required: true
+ schema:
+ type: string
+ '/users':
+ post:
+ tags:
+ - keycloak
+ summary: Create a new keycloak user
+ description: Creates a new user in keycloak. Username must be unique
+ operationId: createUser
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ responses:
+ 2XX:
+ description: Success
+ get:
+ tags:
+ - keycloak
+ summary: Get keycloak users
+ description: Returns a stream of users, filtered according to query.
+ operationId: getUsers
+ parameters:
+ - name: search
+ in: query
+ schema:
+ type: string
+ - name: lastName
+ in: query
+ schema:
+ type: string
+ - name: firstName
+ in: query
+ schema:
+ type: string
+ - name: email
+ in: query
+ schema:
+ type: string
+ - name: username
+ in: query
+ schema:
+ type: string
+ - name: emailVerified
+ in: query
+ schema:
+ type: boolean
+ - name: idpAlias
+ in: query
+ schema:
+ type: string
+ - name: idpUserId
+ in: query
+ schema:
+ type: string
+ - name: first
+ in: query
+ schema:
+ type: integer
+ format: int32
+ - name: max
+ in: query
+ schema:
+ type: integer
+ format: int32
+ - name: enabled
+ in: query
+ schema:
+ type: boolean
+ - name: briefRepresentation
+ in: query
+ schema:
+ type: boolean
+ - name: exact
+ in: query
+ schema:
+ type: boolean
+ - name: q
+ in: query
+ schema:
+ type: string
+ responses:
+ 2XX:
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/User'
+ '/users/count':
+ get:
+ tags:
+ - keycloak
+ summary: Get users count
+ description: Returns the number of users that match the given criteria
+ operationId: getUsersCount
+ parameters:
+ - name: search
+ in: query
+ schema:
+ type: string
+ - name: lastName
+ in: query
+ schema:
+ type: string
+ - name: firstName
+ in: query
+ schema:
+ type: string
+ - name: email
+ in: query
+ schema:
+ type: string
+ - name: emailVerified
+ in: query
+ schema:
+ type: boolean
+ - name: username
+ in: query
+ schema:
+ type: string
+ - name: enabled
+ in: query
+ schema:
+ type: boolean
+ responses:
+ 2XX:
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: integer
+ format: int32
+ '/users/{id}':
+ put:
+ tags:
+ - keycloak
+ summary: Update user
+ description: Updates the user
+ operationId: updateUser
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ responses:
+ 2XX:
+ description: Success
+ get:
+ tags:
+ - keycloak
+ summary: Get user
+ description: Returns representation of the user
+ operationId: getUser
+ responses:
+ 2XX:
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ delete:
+ tags:
+ - keycloak
+ summary: Delete the user
+ description: Deletes the user
+ operationId: deleteUser
+ responses:
+ 2XX:
+ description: Success
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+ '/users/{id}/reset-password':
+ put:
+ tags:
+ - keycloak
+ summary: Reset user password
+ description: Sets up a new password for the user
+ operationId: resetUserPassword
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Credential'
+ responses:
+ 2XX:
+ description: Success
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+ '/users/{id}/role-mappings/realm':
+ get:
+ tags:
+ - keycloak
+ summary: Get realm role mappings
+ description: Returns realm-level role mappings
+ operationId: getRealmRoleMappingsByUserId
+ responses:
+ 2XX:
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Role'
+ post:
+ tags:
+ - keycloak
+ summary: Add realm role mappings
+ description: Adds realm-level role mappings to the user
+ operationId: addRealmRoleMappingsToUser
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Role'
+ responses:
+ 2XX:
+ description: Success
+ delete:
+ tags:
+ - keycloak
+ summary: Delete realm role mappings
+ description: Deletes realm-level role mappings
+ operationId: deleteRealmRoleMappingsByUserId
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Role'
+ responses:
+ 2XX:
+ description: Success
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+ '/users/{id}/role-mappings/realm/available':
+ get:
+ tags:
+ - keycloak
+ summary: Get available realm roles
+ description: Returns realm-level roles that can be mapped
+ operationId: getAvailableRealmRoleMappingsByUserId
+ responses:
+ 2XX:
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Role'
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+ '/users/{id}/execute-actions-email':
+ put:
+ tags:
+ - keycloak
+ summary: Execute actions email
+ description: Send an update account email to the user. An email contains a link the user can click to perform a set of required actions. The redirectUri and clientId parameters are optional. If no redirect is given, then there will be no link back to click after actions have completed. Redirect uri must be a valid uri for the particular clientId
+ operationId: executeActionsEmail
+ parameters:
+ - name: OIDCLoginProtocol.REDIRECT_URI_PARAM
+ in: query
+ description: Redirect uri
+ schema:
+ type: string
+ - name: OIDCLoginProtocol.CLIENT_ID_PARAM
+ in: query
+ description: Client id
+ schema:
+ type: string
+ - name: lifespan
+ in: query
+ description: Number of seconds after which the generated token expires
+ schema:
+ type: integer
+ format: int32
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequiredActions'
+ responses:
+ 2XX:
+ description: Success
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+components:
+ schemas:
+ Role:
+ type: object
+ properties:
+ id:
+ type: string
+ name:
+ type: string
+ description:
+ type: string
+ scopeParamRequired:
+ type: boolean
+ composites:
+ $ref: '#/components/schemas/Composites'
+ composite:
+ type: boolean
+ clientRole:
+ type: boolean
+ containerId:
+ type: string
+ attributes:
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ type: string
+ Composites:
+ type: object
+ properties:
+ realm:
+ type: array
+ items:
+ type: string
+ client:
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ type: string
+ application:
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ type: string
+ User:
+ type: object
+ properties:
+ self:
+ type: string
+ id:
+ type: string
+ createdTimestamp:
+ type: integer
+ format: int64
+ firstName:
+ type: string
+ lastName:
+ type: string
+ email:
+ type: string
+ username:
+ type: string
+ enabled:
+ type: boolean
+ totp:
+ type: boolean
+ emailVerified:
+ type: boolean
+ attributes:
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ type: string
+ credentials:
+ type: array
+ items:
+ $ref: '#/components/schemas/Credential'
+ requiredActions:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequiredActions'
+ federatedIdentities:
+ type: array
+ items:
+ $ref: '#/components/schemas/FederatedIdentity'
+ socialLinks:
+ type: array
+ items:
+ $ref: '#/components/schemas/SocialLink'
+ realmRoles:
+ type: array
+ items:
+ type: string
+ clientRoles:
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ type: string
+ clientConsents:
+ type: array
+ items:
+ $ref: '#/components/schemas/UserConsent'
+ notBefore:
+ type: integer
+ format: int32
+ applicationRoles:
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ type: string
+ federationLink:
+ type: string
+ serviceAccountClientId:
+ type: string
+ groups:
+ type: array
+ items:
+ type: string
+ origin:
+ type: string
+ disableableCredentialTypes:
+ type: array
+ items:
+ type: string
+ access:
+ type: object
+ additionalProperties:
+ type: boolean
+ Credential:
+ type: object
+ properties:
+ id:
+ type: string
+ type:
+ type: string
+ userLabel:
+ type: string
+ secretData:
+ type: string
+ credentialData:
+ type: string
+ priority:
+ type: integer
+ format: int32
+ createdDate:
+ type: integer
+ format: int64
+ value:
+ type: string
+ temporary:
+ type: boolean
+ device:
+ type: string
+ hashedSaltedValue:
+ type: string
+ salt:
+ type: string
+ hashIterations:
+ type: integer
+ format: int32
+ counter:
+ type: integer
+ format: int32
+ algorithm:
+ type: string
+ digits:
+ type: integer
+ format: int32
+ period:
+ type: integer
+ format: int32
+ config:
+ type: object
+ additionalProperties:
+ type: string
+ FederatedIdentity:
+ type: object
+ properties:
+ identityProvider:
+ type: string
+ userId:
+ type: string
+ userName:
+ type: string
+ SocialLink:
+ type: object
+ properties:
+ socialProvider:
+ type: string
+ socialUserId:
+ type: string
+ socialUsername:
+ type: string
+ UserConsent:
+ type: object
+ properties:
+ clientId:
+ type: string
+ grantedClientScopes:
+ type: array
+ items:
+ type: string
+ createdDate:
+ type: integer
+ format: int64
+ lastUpdatedDate:
+ type: integer
+ format: int64
+ grantedRealmRoles:
+ type: array
+ items:
+ type: string
+ RequiredActions:
+ type: string
+ enum:
+ - CONFIGURE_TOTP
+ - TERMS_AND_CONDITIONS
+ - UPDATE_PASSWORD
+ - UPDATE_PROFILE
+ - VERIFY_EMAIL
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ errorMessage:
+ type: string
+
diff --git a/openapi/client-portal-prefs/LICENSE b/openapi/client-portal-prefs/LICENSE
new file mode 100644
index 0000000..abe3069
--- /dev/null
+++ b/openapi/client-portal-prefs/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2021 TNAP / development / system-team
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/openapi/client-portal-prefs/build.gradle b/openapi/client-portal-prefs/build.gradle
new file mode 100644
index 0000000..5201737
--- /dev/null
+++ b/openapi/client-portal-prefs/build.gradle
@@ -0,0 +1,25 @@
+apply plugin: 'org.openapi.generator'
+
+dependencies {
+ implementation "org.springframework.boot:spring-boot-starter-webflux"
+ implementation "org.openapitools:openapi-generator:$openapiVersion"
+}
+
+compileJava {
+ createOpenApiGenerateClientTask(project, "portal_prefs_openapi.yaml", "client_portal_prefs", "PortalPrefsDto")
+ dependsOn = [':openapi:openApiGenerate_client_portal_prefs']
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs += file("$buildDir/openapi/src/main/java")
+ }
+ }
+}
+
+idea {
+ module {
+ generatedSourceDirs += file("$buildDir/openapi/src/main/java")
+ }
+}
diff --git a/openapi/client-portal-prefs/src/portal_prefs_openapi.yaml b/openapi/client-portal-prefs/src/portal_prefs_openapi.yaml
new file mode 100644
index 0000000..86d9e2b
--- /dev/null
+++ b/openapi/client-portal-prefs/src/portal_prefs_openapi.yaml
@@ -0,0 +1,341 @@
+openapi: 3.0.2
+info:
+ title: Config API
+ version: '1.0'
+servers:
+ - url: 'http://localhost:9001'
+tags:
+ - name: preferences
+paths:
+ '/v1/preferences':
+ get:
+ description: Returns user preferences
+ summary: Get user preferences
+ operationId: getPreferences
+ parameters:
+ - $ref: '#/components/parameters/XRequestIdHeader'
+ tags:
+ - preferences
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Preferences'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ put:
+ description: Updates user preferences
+ summary: Update user preferences
+ operationId: updatePreferences
+ parameters:
+ - $ref: '#/components/parameters/XRequestIdHeader'
+ tags:
+ - preferences
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Preferences'
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Preferences'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ post:
+ description: Save user preferences
+ summary: Save user preferences
+ operationId: savePreferences
+ parameters:
+ - $ref: '#/components/parameters/XRequestIdHeader'
+ tags:
+ - preferences
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Preferences'
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Preferences'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ '/actuator/info':
+ get:
+ tags:
+ - preferences
+ summary: Retrieve actuator information
+ description: Proxy for actuator info endpoint
+ operationId: getActuatorInfo
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ActuatorInfoResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+components:
+ parameters:
+ XRequestIdHeader:
+ name: X-Request-Id
+ in: header
+ description: The unique identifier of the request
+ required: true
+ schema:
+ type: string
+ schemas:
+ Preferences:
+ type: object
+ x-extension-1: null
+ properties:
+ properties:
+ type: object
+ required:
+ - properties
+ ActuatorInfoResponse:
+ title: ActuatorInfoResponse
+ type: object
+ properties:
+ git:
+ $ref: '#/components/schemas/ActuatorGitInfo'
+ build:
+ $ref: '#/components/schemas/ActuatorBuildInfo'
+ java:
+ $ref: '#/components/schemas/ActuatorJavaInfo'
+ ActuatorGitInfo:
+ title: ActuatorGitInfo
+ type: object
+ properties:
+ branch:
+ type: string
+ commit:
+ $ref: '#/components/schemas/GitCommitInfo'
+ ActuatorBuildInfo:
+ title: ActuatorBuildInfo
+ type: object
+ properties:
+ artifact:
+ type: string
+ name:
+ type: string
+ time:
+ type: string
+ version:
+ type: string
+ group:
+ type: string
+ GitCommitInfo:
+ title: GitCommitInfo
+ type: object
+ properties:
+ id:
+ type: string
+ time:
+ type: string
+ ActuatorJavaInfo:
+ title: ActuatorJavaInfo
+ type: object
+ properties:
+ version:
+ type: string
+ vendor:
+ $ref: '#/components/schemas/JavaVendorInfo'
+ runtime:
+ $ref: '#/components/schemas/JavaRuntimeInfo'
+ jvm:
+ $ref: '#/components/schemas/JavaJvmInfo'
+ JavaVendorInfo:
+ title: JavaVendorInfo
+ type: object
+ properties:
+ name:
+ type: string
+ version:
+ type: string
+ JavaRuntimeInfo:
+ title: JavaRuntimeInfo
+ type: object
+ properties:
+ name:
+ type: string
+ version:
+ type: string
+ JavaJvmInfo:
+ title: JavaJvmInfo
+ type: object
+ properties:
+ name:
+ type: string
+ vendor:
+ type: string
+ version:
+ type: string
+ Problem:
+ type: object
+ properties:
+ type:
+ type: string
+ format: uri-reference
+ description: |
+ A URI reference that uniquely identifies the problem type only in the context of the provided API. Opposed to the specification in RFC-7807, it is neither recommended to be dereferencable and point to a human-readable documentation nor globally unique for the problem type.
+ default: 'about:blank'
+ example: /problem/connection-error
+ title:
+ type: string
+ description: |
+ A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
+ example: Service Unavailable
+ status:
+ type: integer
+ format: int32
+ description: |
+ The HTTP status code generated by the origin server for this occurrence of the problem.
+ minimum: 100
+ maximum: 600
+ exclusiveMaximum: true
+ example: 503
+ detail:
+ type: string
+ description: |
+ A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
+ example: Connection to database timed out
+ instance:
+ type: string
+ format: uri-reference
+ description: |
+ A URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
+ example: /problem/connection-error#token-info-read-timed-out
+ responses:
+ BadRequest:
+ description: '400: Bad Request'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ Unauthorized:
+ description: '401: Unauthorized'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ Forbidden:
+ description: '403: Forbidden'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ NotFound:
+ description: '404: Not Found'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ NotAllowed:
+ description: '405: Method Not Allowed'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ Conflict:
+ description: '409: Conflict'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ InternalServerError:
+ description: Internal Server Error
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ BadGateway:
+ description: Bad Gateway
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
diff --git a/openapi/server/LICENSE b/openapi/server/LICENSE
new file mode 100644
index 0000000..abe3069
--- /dev/null
+++ b/openapi/server/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2021 TNAP / development / system-team
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/openapi/server/build.gradle b/openapi/server/build.gradle
new file mode 100644
index 0000000..d3b4a47
--- /dev/null
+++ b/openapi/server/build.gradle
@@ -0,0 +1,48 @@
+apply plugin: 'org.openapi.generator'
+
+dependencies {
+ implementation "org.springframework.boot:spring-boot-starter-webflux"
+ implementation "org.openapitools:openapi-generator:$openapiVersion"
+ implementation "org.webjars:redoc:$redocVersion"
+}
+
+openApiGenerate {
+ generatorName = "spring"
+ library = "spring-boot"
+ inputSpec = "$projectDir/src/main/resources/static/api.yaml"
+ outputDir = "$buildDir/openapi"
+ configOptions = [
+ openApiNullable: "false",
+ skipDefaultInterface: "true",
+ dateLibrary: "java8",
+ interfaceOnly: "true",
+ useTags: "true",
+ reactive: "true",
+ ]
+ generateApiTests = false
+ generateApiDocumentation = true
+ generateModelTests = false
+ generateModelDocumentation = false
+ invokerPackage = "org.onap.portal.bff.openapi.server"
+ apiPackage = "org.onap.portal.bff.openapi.server.api"
+ modelPackage = "org.onap.portal.bff.openapi.server.model"
+ modelNameSuffix = "ApiDto"
+}
+
+compileJava {
+ dependsOn tasks.openApiGenerate
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs += file("$buildDir/openapi/src/main/java")
+ }
+ }
+}
+
+idea {
+ module {
+ generatedSourceDirs += file("$buildDir/openapi/src/main/java")
+ }
+}
diff --git a/openapi/server/src/main/resources/static/api-docs.html b/openapi/server/src/main/resources/static/api-docs.html
new file mode 100644
index 0000000..5c52f49
--- /dev/null
+++ b/openapi/server/src/main/resources/static/api-docs.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Portal BFF API</title>
+ <meta charset="utf-8"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
+
+ <style>
+ body {
+ margin: 0;
+ padding: 0;
+ }
+ </style>
+ </head>
+ <body>
+ <redoc spec-url='api.yaml' required-props-first native-scrollbars hide-download-button></redoc>
+ <script src="webjars/redoc/2.0.0-rc.20/redoc.standalone.js"></script>
+ </body>
+</html>
diff --git a/openapi/server/src/main/resources/static/api.yaml b/openapi/server/src/main/resources/static/api.yaml
new file mode 100644
index 0000000..a7d4b74
--- /dev/null
+++ b/openapi/server/src/main/resources/static/api.yaml
@@ -0,0 +1,969 @@
+openapi: 3.0.3
+info:
+ title: Portal BFF
+ version: '1.0'
+ description: Portal BFF API
+ contact:
+ name: Team Tesla
+servers:
+ - url: 'http://localhost:9080'
+tags:
+ - name: users
+ - name: roles
+ - name: tiles
+ - name: keys
+ - name: preferences
+ - name: actions
+paths:
+ /users:
+ get:
+ summary: List users
+ description: List users
+ operationId: listUsers
+ tags:
+ - users
+ parameters:
+ - $ref: '#/components/parameters/pageQueryParam'
+ - $ref: '#/components/parameters/pageSizeQueryParam'
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ responses:
+ '200':
+ description: List of users
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserListResponse'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ post:
+ summary: Create user
+ description: Create user
+ operationId: createUser
+ tags:
+ - users
+ parameters:
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateUserRequest'
+ responses:
+ '200':
+ description: Detail of user
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserResponse'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ '/users/{userId}':
+ get:
+ summary: Retrieve detail of user
+ description: Retrieve detail of user
+ operationId: getUser
+ tags:
+ - users
+ parameters:
+ - $ref: '#/components/parameters/userIdPathParam'
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ responses:
+ '200':
+ description: Detail of user
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserResponse'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ put:
+ summary: Update user
+ description: Update user
+ operationId: updateUser
+ tags:
+ - users
+ parameters:
+ - $ref: '#/components/parameters/userIdPathParam'
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateUserRequest'
+ responses:
+ '200':
+ description: User updated successfully
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ delete:
+ summary: Delete user
+ description: Delete user
+ operationId: deleteUser
+ tags:
+ - users
+ parameters:
+ - $ref: '#/components/parameters/userIdPathParam'
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ responses:
+ '204':
+ description: No Content
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ '/users/{userId}/roles':
+ get:
+ summary: List assigned roles
+ description: List assigned roles
+ operationId: listAssignedRoles
+ tags:
+ - users
+ parameters:
+ - $ref: '#/components/parameters/userIdPathParam'
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ responses:
+ '200':
+ description: List of assigned roles
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleListResponse'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ put:
+ summary: Update assigned roles
+ description: Update assigned roles
+ operationId: updateAssignedRoles
+ tags:
+ - users
+ parameters:
+ - $ref: '#/components/parameters/userIdPathParam'
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ requestBody:
+ description: IDs of roles which should be assigned
+ required: false
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateAssignedRolesRequest'
+ responses:
+ '200':
+ description: List of assigned roles
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleListResponse'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ '/users/{userId}/roles/available':
+ get:
+ summary: List available roles
+ description: List available roles
+ operationId: listAvailableRoles
+ tags:
+ - users
+ parameters:
+ - $ref: '#/components/parameters/userIdPathParam'
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ responses:
+ '200':
+ description: List of available roles
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleListResponse'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ '/users/{userId}/password':
+ put:
+ summary: Update password
+ description: Update password
+ operationId: updatePassword
+ tags:
+ - users
+ parameters:
+ - $ref: '#/components/parameters/userIdPathParam'
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateUserPasswordRequest'
+ responses:
+ '204':
+ description: Password was changed successfully
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ /roles:
+ get:
+ summary: List roles
+ description: List roles
+ operationId: listRoles
+ tags:
+ - roles
+ parameters:
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ responses:
+ '200':
+ description: List of roles
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleListResponse'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ /preferences:
+ get:
+ description: Returns user preferences
+ summary: Get user preferences
+ operationId: getPreferences
+ parameters:
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ tags:
+ - preferences
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PreferencesResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ put:
+ description: Updates user preferences
+ summary: Update user preferences
+ operationId: updatePreferences
+ parameters:
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ tags:
+ - preferences
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreatePreferencesRequest'
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PreferencesResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ post:
+ description: Save user preferences
+ summary: Save user preferences
+ operationId: savePreferences
+ parameters:
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ tags:
+ - preferences
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreatePreferencesRequest'
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PreferencesResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ '/actions/{userId}':
+ get:
+ summary: Retrieve all actions for a specific user
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ActionsListResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ operationId: getActions
+ parameters:
+ - $ref: '#/components/parameters/pageQueryParam'
+ - $ref: '#/components/parameters/pageSizeQueryParam'
+ - schema:
+ type: integer
+ format: int32
+ in: query
+ name: showLastHours
+ description: Get all actions within the last X hours.
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ description: Get actions for the given userId
+ tags:
+ - actions
+ parameters:
+ - $ref: '#/components/parameters/userIdPathParam'
+ post:
+ summary: Create an action for a given user
+ operationId: createAction
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ActionsResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateActionRequest'
+ description: Only one action in each POST request
+ parameters:
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ description: Create a user action
+ tags:
+ - actions
+ /actions:
+ get:
+ summary: Retrieve all actions from the portal with an optional timeframe
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ActionsListResponse'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '502':
+ $ref: '#/components/responses/BadGateway'
+ operationId: listActions
+ parameters:
+ - $ref: '#/components/parameters/pageQueryParam'
+ - $ref: '#/components/parameters/pageSizeQueryParam'
+ - schema:
+ type: integer
+ format: int32
+ in: query
+ name: showLastHours
+ description: Get all actions within the last X hours.
+ - $ref: '#/components/parameters/xRequestIdHeader'
+ description: Get portal actions from all users
+ tags:
+ - actions
+ parameters: []
+components:
+ responses:
+ BadRequest:
+ description: '400: Bad Request'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ Unauthorized:
+ description: '401: Unauthorized'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ Forbidden:
+ description: '403: Forbidden'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ NotFound:
+ description: '404: Not Found'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ NotAllowed:
+ description: '405: Method Not Allowed'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ Conflict:
+ description: '409: Conflict'
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ InternalServerError:
+ description: Internal Server Error
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ BadGateway:
+ description: Bad Gateway
+ content:
+ application/problem+json:
+ schema:
+ $ref: '#/components/schemas/Problem'
+ headers:
+ X-Request-Id:
+ schema:
+ type: string
+ description: A <uuid4> in each response
+ securitySchemes:
+ bearerAuth:
+ type: http
+ scheme: bearer
+ bearerFormat: JWT
+ headers:
+ X-Request-Id:
+ description: The unique identifier of the request
+ schema:
+ type: string
+ parameters:
+ xRequestIdHeader:
+ name: X-Request-Id
+ in: header
+ schema:
+ type: string
+ description: The unique identifier of the request
+ required: false
+ userIdPathParam:
+ name: userId
+ in: path
+ description: User ID
+ required: true
+ schema:
+ $ref: '#/components/schemas/ValidString'
+ tileIdPathParam:
+ name: tileId
+ in: path
+ description: Tile ID
+ required: true
+ schema:
+ type: integer
+ format: int64
+ pageQueryParam:
+ name: page
+ in: query
+ description: Page index (1..N)
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ default: 1
+ pageSizeQueryParam:
+ name: pageSize
+ in: query
+ description: The size of the page to be returned
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 5000
+ default: 10
+ schemas:
+ CreatePreferencesRequest:
+ type: object
+ required:
+ - keys
+ properties:
+ properties:
+ type: object
+ title: CreatePreferencesRequest
+ x-internal: false
+ PreferencesResponse:
+ type: object
+ title: PreferencesResponse
+ properties:
+ properties:
+ type: object
+ required:
+ - properties
+ ValidString:
+ type: string
+ pattern: '[\w,/!=§#@€:µ.*+?'' \-\u00C0-\u017F]*'
+ Problem:
+ type: object
+ required:
+ - status
+ - title
+ properties:
+ type:
+ type: string
+ format: uri-reference
+ description: |
+ A URI reference that uniquely identifies the problem type only in the context of the provided API. Opposed to the specification in RFC-7807, it is neither recommended to be dereferencable and point to a human-readable documentation nor globally unique for the problem type.
+ default: 'about:blank'
+ example: /problem/connection-error
+ title:
+ type: string
+ description: |
+ A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
+ example: Service Unavailable
+ status:
+ type: integer
+ format: int32
+ description: |
+ The HTTP status code generated by the origin server for this occurrence of the problem.
+ minimum: 100
+ maximum: 600
+ exclusiveMaximum: true
+ example: 503
+ detail:
+ type: string
+ description: |
+ A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
+ example: Connection to database timed out
+ downstreamSystem:
+ type: string
+ description: The downstream system that responded with error
+ enum:
+ - KEYCLOAK
+ - PORTAL_SERVICE
+ - PORTAL_PREFS
+ - PORTAL_HISTORY
+ downstreamStatus:
+ type: integer
+ format: int32
+ description: |
+ Response status from the downstream system.
+ example: 401
+ downstreamMessageId:
+ type: string
+ description: |
+ The identifier of the error message from the downstream system.
+ example: SVC3001
+ instance:
+ type: string
+ format: uri-reference
+ description: |
+ A URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
+ example: /problem/connection-error#token-info-read-timed-out
+ violations:
+ type: array
+ externalDocs:
+ url: https://opensource.zalando.com/problem/constraint-violation/
+ items:
+ $ref: '#/components/schemas/ConstraintViolation'
+ ConstraintViolation:
+ type: object
+ properties:
+ field:
+ type: string
+ message:
+ type: string
+ required:
+ - field
+ - message
+ UserResponse:
+ type: object
+ required:
+ - id
+ - username
+ - enabled
+ properties:
+ id:
+ type: string
+ username:
+ type: string
+ email:
+ type: string
+ firstName:
+ type: string
+ lastName:
+ type: string
+ enabled:
+ type: boolean
+ realmRoles:
+ type: array
+ items:
+ type: string
+ UserListResponse:
+ type: object
+ required:
+ - items
+ - totalCount
+ properties:
+ items:
+ type: array
+ items:
+ $ref: '#/components/schemas/UserResponse'
+ totalCount:
+ type: integer
+ format: int32
+ CreateUserRequest:
+ type: object
+ required:
+ - username
+ - enabled
+ - email
+ - roles
+ properties:
+ username:
+ $ref: '#/components/schemas/ValidString'
+ email:
+ $ref: '#/components/schemas/ValidString'
+ firstName:
+ $ref: '#/components/schemas/ValidString'
+ lastName:
+ $ref: '#/components/schemas/ValidString'
+ enabled:
+ type: boolean
+ roles:
+ type: array
+ items:
+ $ref: '#/components/schemas/Role'
+ UpdateUserRequest:
+ type: object
+ required:
+ - enabled
+ properties:
+ email:
+ $ref: '#/components/schemas/ValidString'
+ firstName:
+ $ref: '#/components/schemas/ValidString'
+ lastName:
+ $ref: '#/components/schemas/ValidString'
+ enabled:
+ type: boolean
+ UpdateUserPasswordRequest:
+ type: object
+ required:
+ - value
+ - temporary
+ properties:
+ value:
+ $ref: '#/components/schemas/ValidString'
+ temporary:
+ type: boolean
+ Role:
+ type: object
+ required:
+ - id
+ - name
+ properties:
+ id:
+ $ref: '#/components/schemas/ValidString'
+ name:
+ $ref: '#/components/schemas/ValidString'
+ RoleListResponse:
+ type: object
+ required:
+ - items
+ - totalCount
+ properties:
+ items:
+ type: array
+ items:
+ $ref: '#/components/schemas/Role'
+ totalCount:
+ type: integer
+ format: int32
+ UpdateAssignedRolesRequest:
+ type: array
+ items:
+ $ref: '#/components/schemas/Role'
+ TileListResponse:
+ type: object
+ required:
+ - items
+ properties:
+ items:
+ type: array
+ items:
+ $ref: '#/components/schemas/TileResponse'
+ TileResponse:
+ type: object
+ required:
+ - id
+ - title
+ - imageUrl
+ - redirectUrl
+ - groups
+ - roles
+ properties:
+ id:
+ type: integer
+ format: int64
+ title:
+ type: string
+ description:
+ type: string
+ imageUrl:
+ type: string
+ imageAltText:
+ type: string
+ redirectUrl:
+ type: string
+ headers:
+ type: string
+ groups:
+ type: array
+ items:
+ type: string
+ roles:
+ type: array
+ items:
+ type: string
+ ActionsResponse:
+ title: ActionsResponse
+ type: object
+ properties:
+ actionCreatedAt:
+ type: string
+ format: date-time
+ action:
+ type: object
+ saveInterval:
+ type: integer
+ format: int32
+ required:
+ - actionCreatedAt
+ - action
+ CreateActionRequest:
+ title: CreateActionRequest
+ type: object
+ properties:
+ userId:
+ type: string
+ actionCreatedAt:
+ type: string
+ format: date-time
+ action:
+ type: object
+ required:
+ - userId
+ - actionCreatedAt
+ - action
+ ActionsListResponse:
+ title: ActionsListResponse
+ type: object
+ properties:
+ items:
+ type: array
+ items:
+ $ref: '#/components/schemas/ActionsResponse'
+ totalCount:
+ type: integer
+ format: int32
+ required:
+ - items
+ - totalCount
+security:
+ - bearerAuth: []