Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/pagopa/p4pa-organization
Browse files Browse the repository at this point in the history
…into P4ADEV-1764-api-category-taxonomy

# Conflicts:
#	openapi/generated.openapi.json
  • Loading branch information
oleksiybozhykntt committed Jan 13, 2025
2 parents aeff788 + 7319390 commit 27cadab
Show file tree
Hide file tree
Showing 35 changed files with 2,192 additions and 1,637 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ HELP.md
!**/src/test/**/target/

#**/src/main/resources/application-local*.properties
/src/main/resources/local-*.env

### STS ###
.apt_generated
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ RUN mkdir -p src/main/java && \

USER ${APP_USER}

RUN gradle dependenciesBuild dependencies --no-daemon


#
# 🏗️ Build Stage
Expand Down
65 changes: 53 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
plugins {
java
id("org.springframework.boot") version "3.3.5"
id("io.spring.dependency-management") version "1.1.6"
id("org.springframework.boot") version "3.4.1"
id("io.spring.dependency-management") version "1.1.7"
jacoco
id("org.sonarqube") version "5.1.0.4882"
id("org.sonarqube") version "6.0.1.5171"
id("com.github.ben-manes.versions") version "0.51.0"
id("org.openapi.generator") version "7.9.0"
id("org.springdoc.openapi-gradle-plugin") version "1.9.0"
id("org.openapi.generator") version "7.10.0"
}

group = "it.gov.pagopa.payhub"
Expand All @@ -29,22 +28,28 @@ repositories {
mavenCentral()
}

val springDocOpenApiVersion = "2.6.0"
val springDocOpenApiVersion = "2.7.0"
val openApiToolsVersion = "0.2.6"
val micrometerVersion = "1.4.0"
val micrometerVersion = "1.4.1"
val postgresJdbcVersion = "42.7.4"
val bouncycastleVersion = "1.79"

dependencies {
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
implementation("org.springframework.boot:spring-boot-starter-data-rest")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("io.micrometer:micrometer-tracing-bridge-otel:$micrometerVersion")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:$springDocOpenApiVersion")
implementation("io.micrometer:micrometer-registry-prometheus")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
implementation("org.openapitools:jackson-databind-nullable:$openApiToolsVersion")

//security
implementation("org.bouncycastle:bcprov-jdk18on:$bouncycastleVersion")

//postgres jdbc
implementation("org.postgresql:postgresql:$postgresJdbcVersion")

Expand All @@ -54,7 +59,8 @@ dependencies {
// Testing
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.mockito:mockito-core")
testImplementation ("org.projectlombok:lombok")
testImplementation("org.projectlombok:lombok")
testImplementation("com.h2database:h2")
}

tasks.withType<Test> {
Expand Down Expand Up @@ -88,12 +94,47 @@ configurations {
}
}

openApi {
apiDocsUrl.set("http://localhost:8080/v3/api-docs")
outputDir.set(file("$projectDir/openapi"))
outputFileName.set("generated.openapi.json")
configure<SourceSetContainer> {
named("main") {
java.srcDir("$projectDir/build/generated/src/main/java")
}
}

tasks.compileJava {
dependsOn("dependenciesBuild")
}

tasks.register("dependenciesBuild") {
group = "AutomaticallyGeneratedCode"
description = "grouping all together automatically generate code tasks"

dependsOn(
"openApiGenerateORGANIZATION"
)
}

springBoot {
mainClass.value("it.gov.pagopa.pu.organization.OrganizationApplication")
}

tasks.register<org.openapitools.generator.gradle.plugin.tasks.GenerateTask>("openApiGenerateORGANIZATION") {
group = "openapi"
description = "description"

generatorName.set("spring")
inputSpec.set("$rootDir/openapi/p4pa-organization.openapi.json")
outputDir.set("$projectDir/build/generated")
apiPackage.set("it.gov.pagopa.pu.organization.controller.generated")
modelPackage.set("it.gov.pagopa.pu.organization.dto.generated")
configOptions.set(mapOf(
"dateLibrary" to "java8",
"requestMappingMode" to "api_interface",
"useSpringBoot3" to "true",
"interfaceOnly" to "true",
"useTags" to "true",
"useBeanValidation" to "true",
"generateConstructorWithAllArgs" to "true",
"generatedConstructorWithRequiredArgs" to "true",
"additionalModelTypeAnnotations" to "@lombok.Builder"
))
}
159 changes: 88 additions & 71 deletions gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,95 +2,112 @@
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
aopalliance:aopalliance:1.0=compileClasspath
ch.qos.logback:logback-classic:1.5.11=compileClasspath
ch.qos.logback:logback-core:1.5.11=compileClasspath
com.fasterxml.jackson.core:jackson-annotations:2.17.2=compileClasspath
com.fasterxml.jackson.core:jackson-core:2.17.2=compileClasspath
com.fasterxml.jackson.core:jackson-databind:2.17.2=compileClasspath
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.2=compileClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2=compileClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2=compileClasspath
com.fasterxml.jackson.module:jackson-module-parameter-names:2.17.2=compileClasspath
com.fasterxml.jackson:jackson-bom:2.17.2=compileClasspath
ch.qos.logback:logback-classic:1.5.12=compileClasspath
ch.qos.logback:logback-core:1.5.12=compileClasspath
com.fasterxml.jackson.core:jackson-annotations:2.18.2=compileClasspath
com.fasterxml.jackson.core:jackson-core:2.18.2=compileClasspath
com.fasterxml.jackson.core:jackson-databind:2.18.2=compileClasspath
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.18.2=compileClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2=compileClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2=compileClasspath
com.fasterxml.jackson.module:jackson-module-parameter-names:2.18.2=compileClasspath
com.fasterxml.jackson:jackson-bom:2.18.2=compileClasspath
com.github.stephenc.jcip:jcip-annotations:1.0-1=compileClasspath
com.jayway.jsonpath:json-path:2.9.0=compileClasspath
com.nimbusds:nimbus-jose-jwt:9.37.3=compileClasspath
com.zaxxer:HikariCP:5.1.0=compileClasspath
io.micrometer:context-propagation:1.1.2=compileClasspath
io.micrometer:micrometer-commons:1.13.6=compileClasspath
io.micrometer:micrometer-core:1.13.6=compileClasspath
io.micrometer:micrometer-jakarta9:1.13.6=compileClasspath
io.micrometer:micrometer-observation:1.13.6=compileClasspath
io.micrometer:micrometer-tracing-bridge-otel:1.4.0=compileClasspath
io.micrometer:micrometer-tracing:1.3.5=compileClasspath
io.micrometer:micrometer-commons:1.14.2=compileClasspath
io.micrometer:micrometer-core:1.14.2=compileClasspath
io.micrometer:micrometer-jakarta9:1.14.2=compileClasspath
io.micrometer:micrometer-observation:1.14.2=compileClasspath
io.micrometer:micrometer-registry-prometheus:1.14.2=compileClasspath
io.micrometer:micrometer-tracing-bridge-otel:1.4.1=compileClasspath
io.micrometer:micrometer-tracing:1.4.1=compileClasspath
io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-incubator:2.9.0-alpha=compileClasspath
io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:2.9.0=compileClasspath
io.opentelemetry.semconv:opentelemetry-semconv:1.25.0-alpha=compileClasspath
io.opentelemetry:opentelemetry-api:1.37.0=compileClasspath
io.opentelemetry:opentelemetry-context:1.37.0=compileClasspath
io.opentelemetry:opentelemetry-extension-trace-propagators:1.37.0=compileClasspath
io.opentelemetry:opentelemetry-sdk-common:1.37.0=compileClasspath
io.opentelemetry:opentelemetry-sdk-logs:1.37.0=compileClasspath
io.opentelemetry:opentelemetry-sdk-metrics:1.37.0=compileClasspath
io.opentelemetry:opentelemetry-sdk-trace:1.37.0=compileClasspath
io.opentelemetry:opentelemetry-sdk:1.37.0=compileClasspath
io.swagger.core.v3:swagger-annotations-jakarta:2.2.22=compileClasspath
io.swagger.core.v3:swagger-core-jakarta:2.2.22=compileClasspath
io.swagger.core.v3:swagger-models-jakarta:2.2.22=compileClasspath
io.opentelemetry:opentelemetry-api:1.43.0=compileClasspath
io.opentelemetry:opentelemetry-context:1.43.0=compileClasspath
io.opentelemetry:opentelemetry-extension-trace-propagators:1.43.0=compileClasspath
io.opentelemetry:opentelemetry-sdk-common:1.43.0=compileClasspath
io.opentelemetry:opentelemetry-sdk-logs:1.43.0=compileClasspath
io.opentelemetry:opentelemetry-sdk-metrics:1.43.0=compileClasspath
io.opentelemetry:opentelemetry-sdk-trace:1.43.0=compileClasspath
io.opentelemetry:opentelemetry-sdk:1.43.0=compileClasspath
io.prometheus:prometheus-metrics-config:1.3.5=compileClasspath
io.prometheus:prometheus-metrics-core:1.3.5=compileClasspath
io.prometheus:prometheus-metrics-model:1.3.5=compileClasspath
io.prometheus:prometheus-metrics-tracer-common:1.3.5=compileClasspath
io.swagger.core.v3:swagger-annotations-jakarta:2.2.25=compileClasspath
io.swagger.core.v3:swagger-core-jakarta:2.2.25=compileClasspath
io.swagger.core.v3:swagger-models-jakarta:2.2.25=compileClasspath
jakarta.activation:jakarta.activation-api:2.1.3=compileClasspath
jakarta.annotation:jakarta.annotation-api:2.1.1=compileClasspath
jakarta.persistence:jakarta.persistence-api:3.1.0=compileClasspath
jakarta.transaction:jakarta.transaction-api:2.0.1=compileClasspath
jakarta.validation:jakarta.validation-api:3.0.2=compileClasspath
jakarta.xml.bind:jakarta.xml.bind-api:4.0.2=compileClasspath
org.antlr:antlr4-runtime:4.13.0=compileClasspath
org.apache.commons:commons-lang3:3.14.0=compileClasspath
org.apache.logging.log4j:log4j-api:2.23.1=compileClasspath
org.apache.logging.log4j:log4j-to-slf4j:2.23.1=compileClasspath
org.apache.tomcat.embed:tomcat-embed-core:10.1.31=compileClasspath
org.apache.tomcat.embed:tomcat-embed-el:10.1.31=compileClasspath
org.apache.tomcat.embed:tomcat-embed-websocket:10.1.31=compileClasspath
org.apache.commons:commons-lang3:3.17.0=compileClasspath
org.apache.logging.log4j:log4j-api:2.24.3=compileClasspath
org.apache.logging.log4j:log4j-to-slf4j:2.24.3=compileClasspath
org.apache.tomcat.embed:tomcat-embed-core:10.1.34=compileClasspath
org.apache.tomcat.embed:tomcat-embed-el:10.1.34=compileClasspath
org.apache.tomcat.embed:tomcat-embed-websocket:10.1.34=compileClasspath
org.aspectj:aspectjweaver:1.9.22.1=compileClasspath
org.atteo:evo-inflector:1.3=compileClasspath
org.hibernate.orm:hibernate-core:6.5.3.Final=compileClasspath
org.bouncycastle:bcprov-jdk18on:1.79=compileClasspath
org.hibernate.orm:hibernate-core:6.6.4.Final=compileClasspath
org.jspecify:jspecify:1.0.0=compileClasspath
org.openapitools:jackson-databind-nullable:0.2.6=compileClasspath
org.postgresql:postgresql:42.7.4=compileClasspath
org.projectlombok:lombok:1.18.34=compileClasspath
org.projectlombok:lombok:1.18.36=compileClasspath
org.slf4j:jul-to-slf4j:2.0.16=compileClasspath
org.slf4j:slf4j-api:2.0.16=compileClasspath
org.springdoc:springdoc-openapi-starter-common:2.6.0=compileClasspath
org.springdoc:springdoc-openapi-starter-webmvc-api:2.6.0=compileClasspath
org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0=compileClasspath
org.springframework.boot:spring-boot-actuator-autoconfigure:3.3.5=compileClasspath
org.springframework.boot:spring-boot-actuator:3.3.5=compileClasspath
org.springframework.boot:spring-boot-autoconfigure:3.3.5=compileClasspath
org.springframework.boot:spring-boot-starter-actuator:3.3.5=compileClasspath
org.springframework.boot:spring-boot-starter-aop:3.3.5=compileClasspath
org.springframework.boot:spring-boot-starter-data-jpa:3.3.5=compileClasspath
org.springframework.boot:spring-boot-starter-data-rest:3.3.5=compileClasspath
org.springframework.boot:spring-boot-starter-jdbc:3.3.5=compileClasspath
org.springframework.boot:spring-boot-starter-json:3.3.5=compileClasspath
org.springframework.boot:spring-boot-starter-logging:3.3.5=compileClasspath
org.springframework.boot:spring-boot-starter-tomcat:3.3.5=compileClasspath
org.springframework.boot:spring-boot-starter-web:3.3.5=compileClasspath
org.springframework.boot:spring-boot-starter:3.3.5=compileClasspath
org.springframework.boot:spring-boot:3.3.5=compileClasspath
org.springframework.data:spring-data-commons:3.3.5=compileClasspath
org.springframework.data:spring-data-jpa:3.3.5=compileClasspath
org.springframework.data:spring-data-rest-core:4.3.5=compileClasspath
org.springframework.data:spring-data-rest-webmvc:4.3.5=compileClasspath
org.springframework.hateoas:spring-hateoas:2.3.3=compileClasspath
org.springdoc:springdoc-openapi-starter-common:2.7.0=compileClasspath
org.springdoc:springdoc-openapi-starter-webmvc-api:2.7.0=compileClasspath
org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0=compileClasspath
org.springframework.boot:spring-boot-actuator-autoconfigure:3.4.1=compileClasspath
org.springframework.boot:spring-boot-actuator:3.4.1=compileClasspath
org.springframework.boot:spring-boot-autoconfigure:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-actuator:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-data-jpa:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-data-rest:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-jdbc:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-json:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-logging:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-oauth2-resource-server:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-tomcat:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-web:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter:3.4.1=compileClasspath
org.springframework.boot:spring-boot:3.4.1=compileClasspath
org.springframework.data:spring-data-commons:3.4.1=compileClasspath
org.springframework.data:spring-data-jpa:3.4.1=compileClasspath
org.springframework.data:spring-data-rest-core:4.4.1=compileClasspath
org.springframework.data:spring-data-rest-webmvc:4.4.1=compileClasspath
org.springframework.hateoas:spring-hateoas:2.4.1=compileClasspath
org.springframework.plugin:spring-plugin-core:3.0.0=compileClasspath
org.springframework:spring-aop:6.1.14=compileClasspath
org.springframework:spring-aspects:6.1.14=compileClasspath
org.springframework:spring-beans:6.1.14=compileClasspath
org.springframework:spring-context:6.1.14=compileClasspath
org.springframework:spring-core:6.1.14=compileClasspath
org.springframework:spring-expression:6.1.14=compileClasspath
org.springframework:spring-jcl:6.1.14=compileClasspath
org.springframework:spring-jdbc:6.1.14=compileClasspath
org.springframework:spring-orm:6.1.14=compileClasspath
org.springframework:spring-tx:6.1.14=compileClasspath
org.springframework:spring-web:6.1.14=compileClasspath
org.springframework:spring-webmvc:6.1.14=compileClasspath
org.webjars:swagger-ui:5.17.14=compileClasspath
org.yaml:snakeyaml:2.2=compileClasspath
org.springframework.security:spring-security-config:6.4.2=compileClasspath
org.springframework.security:spring-security-core:6.4.2=compileClasspath
org.springframework.security:spring-security-crypto:6.4.2=compileClasspath
org.springframework.security:spring-security-oauth2-core:6.4.2=compileClasspath
org.springframework.security:spring-security-oauth2-jose:6.4.2=compileClasspath
org.springframework.security:spring-security-oauth2-resource-server:6.4.2=compileClasspath
org.springframework.security:spring-security-web:6.4.2=compileClasspath
org.springframework:spring-aop:6.2.1=compileClasspath
org.springframework:spring-aspects:6.2.1=compileClasspath
org.springframework:spring-beans:6.2.1=compileClasspath
org.springframework:spring-context:6.2.1=compileClasspath
org.springframework:spring-core:6.2.1=compileClasspath
org.springframework:spring-expression:6.2.1=compileClasspath
org.springframework:spring-jcl:6.2.1=compileClasspath
org.springframework:spring-jdbc:6.2.1=compileClasspath
org.springframework:spring-orm:6.2.1=compileClasspath
org.springframework:spring-tx:6.2.1=compileClasspath
org.springframework:spring-web:6.2.1=compileClasspath
org.springframework:spring-webmvc:6.2.1=compileClasspath
org.webjars:swagger-ui:5.18.2=compileClasspath
org.webjars:webjars-locator-lite:1.0.1=compileClasspath
org.yaml:snakeyaml:2.3=compileClasspath
empty=
Empty file modified gradlew
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ microservice-chart:
resources:
requests:
memory: "256Mi"
cpu: "40m"
cpu: "100m"
limits:
memory: "4Gi"
cpu: "300m"
Expand Down
2 changes: 1 addition & 1 deletion helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ microservice-chart:
resources:
requests:
memory: "256Mi"
cpu: "40m"
cpu: "100m"
limits:
memory: "4Gi"
cpu: "300m"
Expand Down
2 changes: 1 addition & 1 deletion helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ microservice-chart:
resources:
requests:
memory: "256Mi"
cpu: "40m"
cpu: "100m"
limits:
memory: "4Gi"
cpu: "300m"
Expand Down
6 changes: 5 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,16 @@ microservice-chart:
APPLICATIONINSIGHTS_PREVIEW_PROFILER_ENABLED: "false"
ENABLE_AUDIT_APPENDER: "TRUE"


envSecret:
APPLICATIONINSIGHTS_CONNECTION_STRING: appinsights-connection-string
ORGANIZATION_DB_HOST: db-host
ORGANIZATION_DB_USER: db-mypay-login-username
ORGANIZATION_DB_PASSWORD: db-mypay-login-password
# To switch to new db
# ORGANIZATION_DB_USER: db-piattaforma-unitaria-login-username
# ORGANIZATION_DB_PASSWORD: db-piattaforma-unitaria-login-password
BROKER_ENCRYPT_PASSWORD: broker-encrypt-password
JWT_TOKEN_PUBLIC_KEY: jwt-public-key

# nodeSelector: {}

Expand Down
Loading

0 comments on commit 27cadab

Please sign in to comment.