|
118 | 118 | <artifactId>mockito-core</artifactId> |
119 | 119 | <scope>test</scope> |
120 | 120 | </dependency> |
| 121 | + |
| 122 | + <!-- Additional dependencies for OSS code generator resttemplate --> |
| 123 | + <dependency> |
| 124 | + <groupId>org.openapitools</groupId> |
| 125 | + <artifactId>jackson-databind-nullable</artifactId> |
| 126 | + </dependency> |
| 127 | + <dependency> |
| 128 | + <groupId>javax.annotation</groupId> |
| 129 | + <artifactId>javax.annotation-api</artifactId> |
| 130 | + </dependency> |
121 | 131 | </dependencies> |
122 | 132 |
|
123 | | - <profiles> |
124 | | - <profile> |
125 | | - <id>generate</id> |
126 | | - <activation> |
127 | | - <activeByDefault>false</activeByDefault> |
128 | | - <property> |
129 | | - <name>generate</name> |
130 | | - </property> |
131 | | - </activation> |
132 | | - <build> |
133 | | - <plugins> |
134 | | - <plugin> |
135 | | - <groupId>com.sap.cloud.sdk.datamodel</groupId> |
136 | | - <artifactId>openapi-generator-maven-plugin</artifactId> |
| 133 | + <build> |
| 134 | + <plugins> |
| 135 | + <plugin> |
| 136 | + <groupId>org.openapitools</groupId> |
| 137 | + <artifactId>openapi-generator-maven-plugin</artifactId> |
| 138 | + <executions> |
| 139 | + <execution> |
| 140 | + <goals> |
| 141 | + <goal>generate</goal> |
| 142 | + </goals> |
| 143 | + <phase>generate-sources</phase> |
137 | 144 | <configuration> |
138 | | - <skip>true</skip> |
139 | | - <!-- skip automatic generation until we can omit API classes from code generation --> |
140 | | - <outputDirectory>${project.basedir}/src/main/java</outputDirectory> |
141 | | - <apiMaturity>beta</apiMaturity> |
142 | | - <enableOneOfAnyOfGeneration>true</enableOneOfAnyOfGeneration> |
143 | | - <compileScope>COMPILE</compileScope> |
144 | | - <deleteOutputDirectory>true</deleteOutputDirectory> |
| 145 | + <!-- Specify the input OpenAPI spec file --> |
| 146 | + <inputSpec>${project.basedir}/src/main/resources/spec/orchestration.yaml</inputSpec> |
| 147 | + <output>${project.basedir}</output> |
| 148 | + <!-- Specify the generator to use, e.g., java, spring, kotlin, etc. --> |
| 149 | + <generatorName>java</generatorName> |
| 150 | + <!-- Specify the package names for models, APIs, and invokers --> |
| 151 | + <modelPackage>com.sap.ai.sdk.orchestration.client.model</modelPackage> |
| 152 | + <apiPackage>com.sap.ai.sdk.orchestration.client.api</apiPackage> |
| 153 | + <invokerPackage>com.sap.ai.sdk.orchestration.client.invoker</invokerPackage> |
| 154 | + |
| 155 | + <!-- Global properties level; can be unpacked with 'generate' prefix--> |
| 156 | + <globalProperties> |
| 157 | + <apiDocs>false</apiDocs> |
| 158 | + <modelDocs>false</modelDocs> |
| 159 | + <modelTests>false</modelTests> |
| 160 | + <apiTests>false</apiTests> |
| 161 | + <minimalUpdate>true</minimalUpdate> |
| 162 | + </globalProperties> |
| 163 | + |
| 164 | + <!-- Generator Specific properties level; some can be unpacked--> |
| 165 | + <configOptions> |
| 166 | + <generateBuilders>true</generateBuilders> |
| 167 | + <failOnUnknownProperties>false</failOnUnknownProperties> |
| 168 | + <hideGenerationTimestamp>true</hideGenerationTimestamp> |
| 169 | + <disallowAdditionalPropertiesIfNotPresent>false</disallowAdditionalPropertiesIfNotPresent> |
| 170 | + <enumUnknownDefaultCase>true</enumUnknownDefaultCase> |
| 171 | + <useBeanValidation>false</useBeanValidation> |
| 172 | + <useOneOfInterfaces>true</useOneOfInterfaces> |
| 173 | + <!--<legacyDiscriminatorBehavior>false</legacyDiscriminatorBehavior>--> |
| 174 | + </configOptions> |
| 175 | + <generateModels>true</generateModels> |
| 176 | + <generateSupportingFiles>false</generateSupportingFiles> |
| 177 | + <generateApis>false</generateApis> |
| 178 | + <library>resttemplate</library> |
| 179 | + <!--<configHelp>true</configHelp>--> |
145 | 180 | </configuration> |
146 | | - <executions> |
147 | | - <execution> |
148 | | - <id>orchestration</id> |
149 | | - <goals> |
150 | | - <goal>generate</goal> |
151 | | - </goals> |
152 | | - <phase>generate-sources</phase> |
153 | | - <configuration> |
154 | | - <inputSpec>${project.basedir}/src/main/resources/spec/orchestration.yaml</inputSpec> |
155 | | - <apiPackage>com.sap.ai.sdk.orchestration.client</apiPackage> |
156 | | - <modelPackage>com.sap.ai.sdk.orchestration.client.model</modelPackage> |
157 | | - <additionalProperties> |
158 | | - <pojoBuilderMethodName>create</pojoBuilderMethodName> |
159 | | - <pojoBuildMethodName/> |
160 | | - <pojoConstructorVisibility>protected</pojoConstructorVisibility> |
161 | | - <enumUnknownDefaultCase>true</enumUnknownDefaultCase> |
162 | | - </additionalProperties> |
163 | | - </configuration> |
164 | | - </execution> |
165 | | - </executions> |
166 | | - </plugin> |
167 | | - </plugins> |
168 | | - </build> |
169 | | - </profile> |
170 | | - </profiles> |
| 181 | + </execution> |
| 182 | + </executions> |
| 183 | + </plugin> |
| 184 | + </plugins> |
| 185 | + </build> |
171 | 186 | </project> |
0 commit comments