Skip to content

Commit

Permalink
feat: init data template (#48)
Browse files Browse the repository at this point in the history
* feat: create import template

* feat: update helm chart, update application load

* feat: update template import

* fix: sonar issues
  • Loading branch information
andrejpetras authored May 8, 2024
1 parent 0304e89 commit 4134914
Show file tree
Hide file tree
Showing 24 changed files with 675 additions and 1,254 deletions.
113 changes: 9 additions & 104 deletions docs/modules/onecx-permission-svc/pages/onecx-permission-svc-docs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ onecx.permission.token.issuer.public-key-location.suffix=/protocol/openid-connec
onecx.permission.token.issuer.public-key-location.enabled=false
onecx.permission.token.claim.path=realm_access/roles
tkit.dataimport.enabled=false
tkit.dataimport.configurations.permission.file=dev-data.import.json
tkit.dataimport.configurations.permission.metadata.operation=UPDATE
tkit.dataimport.configurations.permission.enabled=false
tkit.dataimport.configurations.permission.stop-at-error=true
tkit.dataimport.configurations.template.file=/import/template.json
tkit.dataimport.configurations.template.metadata.tenants=default
tkit.dataimport.configurations.template.class-path=true
tkit.dataimport.configurations.template.enabled=false
tkit.dataimport.configurations.template.stop-at-error=true
%prod.quarkus.datasource.jdbc.url=${DB_URL:jdbc:postgresql://postgresdb:5432/onecx-permission?sslmode=disable}
%prod.quarkus.datasource.username=${DB_USER:onecx-permission}
%prod.quarkus.datasource.password=${DB_PWD:onecx-permission}
Expand Down Expand Up @@ -56,106 +57,10 @@ app:
repository: "onecx/onecx-permission-svc"
db:
enabled: true
config:
enabled: true
values: |
tkit.dataimport.enabled=true
tkit.dataimport.configurations.permission.file=/deployments/data/data-import.json
tkit.dataimport.configurations.permission.enabled=true
data:
import:
enabled: true
mountPath: /deployments/data/data-import.json
values: |-
{
"products" : {
"onecx-permission" : {
"applications": {
"onecx-permission-bff": {
"name": "onecx-permission-bff",
"description": "onecx-permission-bff",
"permissions": {
"permission": {
"read": "permission on all GET requests and POST search",
"write": "permission on PUT, POST, PATCH requests, where objects are saved or updated",
"delete": "permission on all DELETE requests"
},
"role": {
"read": "role on all GET requests and POST search",
"write": "role on PUT, POST, PATCH requests, where objects are saved or updated",
"delete": "role on all DELETE requests"
},
"assignment": {
"read": "assignment on all GET requests and POST search",
"write": "assignment on PUT, POST, PATCH requests, where objects are saved or updated",
"delete": "assignment on all DELETE requests"
},
"application": {
"read": "application on all GET requests and POST search",
"write": "application on PUT, POST, PATCH requests, where objects are saved or updated",
"delete": "application on all DELETE requests"
},
"workspace": {
"read": "workspace on all GET requests and POST search",
"write": "workspace on PUT, POST, PATCH requests, where objects are saved or updated",
"delete": "workspace on all DELETE requests"
}
}
},
"onecx-permission-ui": {
"name": "onecx-permission-ui",
"description": "onecx-permission-ui",
"permissions": {
"APP": {
"EDIT": "Edit app",
"SAVE": "Update and save app",
"SEARCH": "Search apps",
"VIEW": "View mode for app"
},
"PERMISSION": {
"GRANT": "Assign or remove assignment of a permission to a role",
"CREATE": "Create permission",
"DELETE": "Delete permission",
"EDIT": "Edit app",
"SAVE": "Update and save app"
},
"ROLE": {
"CREATE": "Create role",
"DELETE": "Delete role",
"EDIT": "Edit app",
"SAVE": "Update and save app"
}
}
}
}
}
},
"tenants": {
"default": {
"roles": {
"onecx-admin": {
"description": "onecx-admin",
"assignments": {
"onecx-permission": {
"onecx-permission-bff": {
"permission": [ "read", "write", "delete"],
"role": [ "read", "write", "delete"],
"assignment": [ "read", "write", "delete"],
"application": [ "read", "write", "delete"],
"workspace": [ "read", "write", "delete"]
},
"onecx-permission-ui": {
"APP": [ "EDIT", "SAVE", "SEARCH", "VIEW" ],
"PERMISSION": [ "GRANT", "CREATE", "DELETE", "EDIT", "SAVE" ],
"ROLE": [ "CREATE", "DELETE", "EDIT", "SAVE" ]
}
}
}
}
}
}
}
}
----



----
Original file line number Diff line number Diff line change
Expand Up @@ -12,146 +12,157 @@ h| Version

| https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-core.html[Link]
|
| 0.17.0
| 0.18.0

| onecx-tenant

| https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-tenant.html[Link]
| https://github.com/onecx/onecx-quarkus/blob/0.17.0/docs/modules/onecx-quarkus/pages/includes/onecx-tenant.adoc[Link]
| 0.17.0
| https://github.com/onecx/onecx-quarkus/blob/0.18.0/docs/modules/onecx-quarkus/pages/includes/onecx-tenant.adoc[Link]
| 0.18.0

| tkit-quarkus-data-import

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-data-import.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.22.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-data-import.adoc[Link]
| 2.22.0
| https://github.com/1000kit/tkit-quarkus/blob/2.23.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-data-import.adoc[Link]
| 2.23.0

| tkit-quarkus-rest-context

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest-context.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.22.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link]
| 2.22.0
| https://github.com/1000kit/tkit-quarkus/blob/2.23.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link]
| 2.23.0

| tkit-quarkus-jpa-tenant

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-jpa-tenant.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.22.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa-tenant.adoc[Link]
| 2.22.0
| https://github.com/1000kit/tkit-quarkus/blob/2.23.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa-tenant.adoc[Link]
| 2.23.0

| tkit-quarkus-jpa

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-jpa.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.22.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa.adoc[Link]
| 2.22.0
| https://github.com/1000kit/tkit-quarkus/blob/2.23.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa.adoc[Link]
| 2.23.0

| tkit-quarkus-log-cdi

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-cdi.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.22.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.22.0
| https://github.com/1000kit/tkit-quarkus/blob/2.23.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.23.0

| tkit-quarkus-log-rs

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-rs.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.22.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.22.0
| https://github.com/1000kit/tkit-quarkus/blob/2.23.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.23.0

| tkit-quarkus-log-json

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-json.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.22.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.22.0
| https://github.com/1000kit/tkit-quarkus/blob/2.23.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.23.0

| tkit-quarkus-rest

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.22.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link]
| 2.22.0
| https://github.com/1000kit/tkit-quarkus/blob/2.23.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link]
| 2.23.0

| quarkus-arc

| https://quarkus.io/guides/cdi-reference[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-arc.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-liquibase
| https://quarkus.io/guides/liquibase[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-liquibase.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-smallrye-health
| https://quarkus.io/guides/smallrye-health[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-health.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-micrometer-registry-prometheus
| https://quarkus.io/guides/telemetry-micrometer[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-micrometer-registry-prometheus.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-hibernate-orm
| https://quarkus.io/guides/hibernate-orm[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-hibernate-orm.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-rest
| https://quarkus.io/guides/rest[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-rest.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-rest-jackson
| https://quarkus.io/guides/rest-json[Link]
|
| 3.9.3
| 3.9.4
| quarkus-jdbc-postgresql
| https://quarkus.io/guides/datasource[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-jdbc-postgresql.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-smallrye-openapi
| https://quarkus.io/guides/openapi-swaggerui[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-openapi.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-hibernate-validator
| https://quarkus.io/guides/validation[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-hibernate-validator.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-opentelemetry
| https://quarkus.io/guides/opentelemetry[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-opentelemetry.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-oidc
| https://quarkus.io/guides/security-oidc-bearer-token-authentication-tutorial[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-oidc.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-container-image-docker
| https://quarkus.io/guides/container-image[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-container-image-docker.adoc[Link]
| 3.9.3
| 3.9.4
| quarkus-smallrye-context-propagation
|
|
| 3.9.3
| 3.9.4
|===r-image-docker.adoc[Link]
| 3.9.4
| quarkus-smallrye-context-propagation
|
|
| 3.9.4
|===
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.tkit.onecx</groupId>
<artifactId>onecx-quarkus3-parent</artifactId>
<version>0.48.0</version>
<version>0.49.0</version>
</parent>

<artifactId>onecx-permission-svc</artifactId>
Expand Down Expand Up @@ -184,15 +184,15 @@
</configuration>
<executions>
<execution>
<id>di-v1</id>
<id>template</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>src/main/openapi/onecx-permission-di-v1.yaml</inputSpec>
<apiPackage>gen.org.tkit.onecx.permission.domain.di.v1</apiPackage>
<modelPackage>gen.org.tkit.onecx.permission.domain.di.v1.model</modelPackage>
<modelNameSuffix>DTOV1</modelNameSuffix>
<inputSpec>src/main/openapi/onecx-permission-di-template.yaml</inputSpec>
<apiPackage>gen.org.tkit.onecx.permission.domain.template</apiPackage>
<modelPackage>gen.org.tkit.onecx.permission.domain.template.model</modelPackage>
<modelNameSuffix>DTO</modelNameSuffix>
<generateApis>false</generateApis>
</configuration>
</execution>
Expand Down
Loading

0 comments on commit 4134914

Please sign in to comment.