Skip to content

Commit 1bd9088

Browse files
committed
Update pom for using OSS generator
1 parent 66fe024 commit 1bd9088

File tree

2 files changed

+99
-17
lines changed

2 files changed

+99
-17
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# OpenAPI Generator Ignore
2+
3+
.github/
4+
gradle/
5+
.gitignore
6+
.travis.yml
7+
build.gradle
8+
build.sbt
9+
git_push.sh
10+
gradle.properties
11+
gradlew
12+
gradlew.bat
13+
pom.xml
14+
README.md
15+
settings.gradle
16+
src/main/AndroidManifest.xml
17+
.openapi-generator-ignore
18+
api/
19+
.openapi-generator/
20+
.openapi-generator

orchestration/pom.xml

Lines changed: 79 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -118,39 +118,101 @@
118118
<artifactId>mockito-core</artifactId>
119119
<scope>test</scope>
120120
</dependency>
121+
122+
<!-- Additional dependencies for OSS code generator -->
123+
<dependency>
124+
<groupId>org.openapitools</groupId>
125+
<artifactId>jackson-databind-nullable</artifactId>
126+
<version>0.2.6</version>
127+
</dependency>
128+
<dependency>
129+
<groupId>javax.annotation</groupId>
130+
<artifactId>javax.annotation-api</artifactId>
131+
<version>1.2</version>
132+
</dependency>
121133
</dependencies>
122134

123135
<build>
124136
<plugins>
137+
<!-- <plugin>
138+
<groupId>com.sap.cloud.sdk.datamodel</groupId>
139+
<artifactId>openapi-generator-maven-plugin</artifactId>
140+
<configuration>
141+
<skip>true</skip>
142+
&lt;!&ndash; skip automatic generation until we can omit API classes from code generation &ndash;&gt;
143+
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
144+
<apiMaturity>beta</apiMaturity>
145+
<enableOneOfAnyOfGeneration>true</enableOneOfAnyOfGeneration>
146+
<compileScope>COMPILE</compileScope>
147+
<deleteOutputDirectory>true</deleteOutputDirectory>
148+
</configuration>
149+
<executions>
150+
<execution>
151+
<id>orchestration</id>
152+
<goals>
153+
<goal>generate</goal>
154+
</goals>
155+
<phase>generate-sources</phase>
156+
<configuration>
157+
<inputSpec>${project.basedir}/src/main/resources/spec/orchestration.yaml</inputSpec>
158+
<apiPackage>com.sap.ai.sdk.orchestration.client</apiPackage>
159+
<modelPackage>com.sap.ai.sdk.orchestration.client.model</modelPackage>
160+
<additionalProperties>
161+
<pojoBuilderMethodName>create</pojoBuilderMethodName>
162+
<pojoBuildMethodName/>
163+
<pojoConstructorVisibility>protected</pojoConstructorVisibility>
164+
<enumUnknownDefaultCase>true</enumUnknownDefaultCase>
165+
</additionalProperties>
166+
</configuration>
167+
</execution>
168+
</executions>
169+
</plugin>-->
170+
125171
<plugin>
126-
<groupId>com.sap.cloud.sdk.datamodel</groupId>
172+
<groupId>org.openapitools</groupId>
127173
<artifactId>openapi-generator-maven-plugin</artifactId>
128-
<configuration>
129-
<skip>true</skip>
130-
<!-- skip automatic generation until we can omit API classes from code generation -->
131-
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
132-
<apiMaturity>beta</apiMaturity>
133-
<enableOneOfAnyOfGeneration>true</enableOneOfAnyOfGeneration>
134-
<compileScope>COMPILE</compileScope>
135-
<deleteOutputDirectory>true</deleteOutputDirectory>
136-
</configuration>
174+
<version>7.9.0</version>
137175
<executions>
138176
<execution>
139-
<id>orchestration</id>
140177
<goals>
141178
<goal>generate</goal>
142179
</goals>
143180
<phase>generate-sources</phase>
144181
<configuration>
182+
<!-- Specify the input OpenAPI spec file -->
145183
<inputSpec>${project.basedir}/src/main/resources/spec/orchestration.yaml</inputSpec>
146-
<apiPackage>com.sap.ai.sdk.orchestration.client</apiPackage>
184+
<output>${project.basedir}</output>
185+
<!-- Specify the generator to use, e.g., java, spring, kotlin, etc. -->
186+
<generatorName>java</generatorName>
187+
<!-- Specify the package names for models, APIs, and invokers -->
147188
<modelPackage>com.sap.ai.sdk.orchestration.client.model</modelPackage>
148-
<additionalProperties>
149-
<pojoBuilderMethodName>create</pojoBuilderMethodName>
150-
<pojoBuildMethodName/>
151-
<pojoConstructorVisibility>protected</pojoConstructorVisibility>
189+
<apiPackage>com.sap.ai.sdk.orchestration.client.api</apiPackage>
190+
<invokerPackage>com.sap.ai.sdk.orchestration.client.invoker</invokerPackage>
191+
192+
<!-- Global properties level; can be unpacked with 'generate' prefix-->
193+
<globalProperties>
194+
<apiDocs>false</apiDocs>
195+
<modelDocs>false</modelDocs>
196+
<modelTests>false</modelTests>
197+
<apiTests>false</apiTests>
198+
<minimalUpdate>true</minimalUpdate>
199+
</globalProperties>
200+
201+
<!-- Generator Specific properties level; some can be unpacked-->
202+
<configOptions>
203+
<generateBuilders>true</generateBuilders>
204+
<failOnUnknownProperties>false</failOnUnknownProperties>
205+
<hideGenerationTimestamp>true</hideGenerationTimestamp>
206+
<disallowAdditionalPropertiesIfNotPresent>false</disallowAdditionalPropertiesIfNotPresent>
152207
<enumUnknownDefaultCase>true</enumUnknownDefaultCase>
153-
</additionalProperties>
208+
<useBeanValidation>false</useBeanValidation>
209+
<modelAnnotations/>
210+
</configOptions>
211+
<generateModels>true</generateModels>
212+
<generateSupportingFiles>false</generateSupportingFiles>
213+
<generateApis>false</generateApis>
214+
<library>resttemplate</library>
215+
<!--<configHelp>true</configHelp>-->
154216
</configuration>
155217
</execution>
156218
</executions>

0 commit comments

Comments
 (0)