File tree Expand file tree Collapse file tree 6 files changed +48
-10
lines changed
main/java/it/gov/pagopa/template
test/java/it/gov/pagopa/template/utils Expand file tree Collapse file tree 6 files changed +48
-10
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,16 @@ Here is a quick overview of the files and directories included in this repositor
1111``` plaintext
1212.
1313├── .github/ # GitHub configuration files
14- ├── openapi / # OpenAPI specification files
14+ ├── gradle / # Gradle wrapper files
1515├── helm/ # Helm charts for Kubernetes deployments
16+ ├── openapi/ # OpenAPI specification files
1617├── src/ # Source code for the Java application
1718│ ├── main/
1819│ └── test/
1920├── build.gradle.kts # Gradle build file
20- ├── settings.gradle.kts # Gradle settings file
2121├── Dockerfile # Docker build file
2222├── README.md # Project documentation
23+ ├── settings.gradle.kts # Gradle settings file
2324└── .gitignore # Git ignore rules
2425```
2526
Original file line number Diff line number Diff line change @@ -108,15 +108,15 @@ configure<SourceSetContainer> {
108108}
109109
110110springBoot {
111- mainClass.value(" it.gov.pagopa.payhub. template.payments.java.repository.PayhubApplication " )
111+ mainClass.value(" it.gov.pagopa.template.TemplateApplication " )
112112}
113113
114114openApiGenerate {
115115 generatorName.set(" spring" )
116116 inputSpec.set(" $rootDir /openapi/template-payments-java-repository.openapi.yaml" )
117117 outputDir.set(" $projectDir /build/generated" )
118- apiPackage.set(" it.gov.pagopa.payhub .controller.generated" )
119- modelPackage.set(" it.gov.pagopa.payhub .model.generated" )
118+ apiPackage.set(" it.gov.pagopa.template .controller.generated" )
119+ modelPackage.set(" it.gov.pagopa.template .model.generated" )
120120 configOptions.set(mapOf (
121121 " dateLibrary" to " java8" ,
122122 " requestMappingMode" to " api_interface" ,
Original file line number Diff line number Diff line change 1+ package it .gov .pagopa .template ;
2+
13import org .springframework .boot .SpringApplication ;
24import org .springframework .boot .autoconfigure .SpringBootApplication ;
35
46@ SpringBootApplication
5- public class PayhubApplication {
7+ public class TemplateApplication {
68
79 public static void main (String [] args ) {
8- SpringApplication .run (PayhubApplication .class , args );
10+ SpringApplication .run (TemplateApplication .class , args );
911 }
1012
1113}
Original file line number Diff line number Diff line change 1+ package it .gov .pagopa .template .config ;
2+
3+ import io .swagger .v3 .oas .models .Components ;
4+ import io .swagger .v3 .oas .models .OpenAPI ;
5+ import io .swagger .v3 .oas .models .info .Info ;
6+ import org .springframework .beans .factory .annotation .Value ;
7+ import org .springframework .context .annotation .Bean ;
8+ import org .springframework .context .annotation .Configuration ;
9+
10+ /**
11+ * The Class SwaggerConfig.
12+ */
13+ @ Configuration
14+ public class SwaggerConfig {
15+
16+ /** The title. */
17+ @ Value ("${swagger.title:${spring.application.name}}" )
18+ private String title ;
19+
20+ /** The description. */
21+ @ Value ("${swagger.description:Api and Models}" )
22+ private String description ;
23+
24+ /** The version. */
25+ @ Value ("${swagger.version:${spring.application.version}}" )
26+ private String version ;
27+
28+ @ Bean
29+ public OpenAPI customOpenAPI () {
30+ return new OpenAPI ().components (new Components ()).info (new Info ()
31+ .title (title )
32+ .description (description )
33+ .version (version ));
34+ }
35+ }
Original file line number Diff line number Diff line change 1- package utils ;
1+ package it . gov . pagopa . template . utils ;
22
33public class Calculator {
44
Original file line number Diff line number Diff line change 1- package utils ;
1+ package it . gov . pagopa . template . utils ;
22
3- import static org .junit .jupiter .api .Assertions .* ;
3+ import static org .junit .jupiter .api .Assertions .assertEquals ;
44
55import org .junit .jupiter .api .BeforeEach ;
66import org .junit .jupiter .api .DisplayName ;
You can’t perform that action at this time.
0 commit comments