Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: P4ADEV-1667 create new model and repository #3

Merged
merged 17 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Dockerfile
antonioT90 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ RUN mkdir -p src/main/java && \

USER ${APP_USER}

RUN gradle openApiGenerate dependencies --no-daemon

#
# 🏗️ Build Stage
#
Expand Down
37 changes: 11 additions & 26 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
id("org.sonarqube") version "5.1.0.4882"
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"
}

group = "it.gov.pagopa.payhub"
Expand All @@ -31,16 +32,22 @@ repositories {
val springDocOpenApiVersion = "2.6.0"
val openApiToolsVersion = "0.2.6"
val micrometerVersion = "1.4.0"
val postgresJdbcVersion = "42.7.4"

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

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

compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")

Expand Down Expand Up @@ -81,34 +88,12 @@ configurations {
}
}

tasks.compileJava {
dependsOn("openApiGenerate")
}

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

springBoot {
mainClass.value("it.gov.pagopa.pu.debtpositions.DebtPositionsApplication")
}

openApiGenerate {
generatorName.set("spring")
inputSpec.set("$rootDir/openapi/template-payments-java-repository.openapi.yaml")
outputDir.set("$projectDir/build/generated")
apiPackage.set("it.gov.pagopa.template.controller.generated")
modelPackage.set("it.gov.pagopa.template.model.generated")
configOptions.set(mapOf(
"dateLibrary" to "java8",
"requestMappingMode" to "api_interface",
"useSpringBoot3" to "true",
"interfaceOnly" to "true",
"useTags" to "true",
"generateConstructorWithAllArgs" to "false",
"generatedConstructorWithRequiredArgs" to "false",
"additionalModelTypeAnnotations" to "@lombok.Data @lombok.Builder @lombok.AllArgsConstructor @lombok.RequiredArgsConstructor"
))
}
antonioT90 marked this conversation as resolved.
Show resolved Hide resolved
23 changes: 23 additions & 0 deletions gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ 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
com.jayway.jsonpath:json-path:2.9.0=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
Expand All @@ -35,15 +37,22 @@ io.swagger.core.v3:swagger-core-jakarta:2.2.22=compileClasspath
io.swagger.core.v3:swagger-models-jakarta:2.2.22=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.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.openapitools:jackson-databind-nullable:0.2.6=compileClasspath
org.postgresql:postgresql:42.7.4=compileClasspath
org.projectlombok:lombok:1.18.34=compileClasspath
org.slf4j:jul-to-slf4j:2.0.16=compileClasspath
org.slf4j:slf4j-api:2.0.16=compileClasspath
Expand All @@ -54,18 +63,32 @@ org.springframework.boot:spring-boot-actuator-autoconfigure:3.3.5=compileClasspa
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.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
Expand Down
3 changes: 3 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ microservice-chart:

envSecret:
APPLICATIONINSIGHTS_CONNECTION_STRING: appinsights-connection-string
DEBT_POSITIONS_DB_HOST: db-host
DEBT_POSITIONS_DB_USER: db-piattaforma-unitaria-login-username
DEBT_POSITIONS_DB_PASSWORD: db-piattaforma-unitaria-login-password

# nodeSelector: {}

Expand Down
Loading
Loading