Skip to content

Commit 02bb3c7

Browse files
committed
spring-http-interface: introduce useHttpServiceProxyFactoryInterfacesConfigurator config
1 parent d84e5f3 commit 02bb3c7

67 files changed

Lines changed: 18 additions & 17 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/samples-jdk17.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- samples/client/petstore/spring-http-interface/**
1111
- samples/client/petstore/spring-http-interface-reactive-noResponseEntity/**
1212
- samples/client/petstore/spring-http-interface-noResponseEntity/**
13-
- samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/**
13+
- samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/**
1414
- samples/client/petstore/java/webclient-jakarta/**
1515
- samples/client/petstore/java/microprofile-rest-client-outer-enum/**
1616
# servers
@@ -28,7 +28,7 @@ on:
2828
- samples/client/petstore/spring-http-interface/**
2929
- samples/client/petstore/spring-http-interface-reactive-noResponseEntity/**
3030
- samples/client/petstore/spring-http-interface-noResponseEntity/**
31-
- samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/**
31+
- samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/**
3232
- samples/client/petstore/java/webclient-jakarta/**
3333
- samples/client/petstore/java/microprofile-rest-client-outer-enum/**
3434
# servers
@@ -52,7 +52,7 @@ jobs:
5252
- samples/client/petstore/spring-http-interface
5353
- samples/client/petstore/spring-http-interface-reactive-noResponseEntity
5454
- samples/client/petstore/spring-http-interface-noResponseEntity
55-
- samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration
55+
- samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator
5656
- samples/client/petstore/java/webclient-jakarta
5757
- samples/client/petstore/java/microprofile-rest-client-outer-enum
5858
# servers

bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
generatorName: spring
22
library: spring-http-interface
3-
outputDir: samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration
3+
outputDir: samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator
44
inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
55
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
66
additionalProperties:
7-
artifactId: spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration
7+
artifactId: spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator
88
snapshotVersion: "true"
99
hideGenerationTimestamp: "true"
1010
# documentation provider should be ignored
@@ -14,7 +14,7 @@ additionalProperties:
1414
# validation should be ignored
1515
useBeanValidation: "true"
1616
performBeanValidation: "true"
17-
useHttpServiceProxyFactoryInterfacesConfiguration: "true"
17+
useHttpServiceProxyFactoryInterfacesConfigurator: "true"
1818
# needed until updating the default parentVersion (3.1.3) to 3.2+
1919
parentGroupId: "org.springframework.boot"
2020
parentArtifactId: "spring-boot-starter-parent"

docs/generators/java-camel.md

Lines changed: 1 addition & 1 deletion

docs/generators/spring.md

Lines changed: 1 addition & 1 deletion

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public class SpringCodegen extends AbstractJavaCodegen
102102
public static final String SPRING_BOOT = "spring-boot";
103103
public static final String SPRING_CLOUD_LIBRARY = "spring-cloud";
104104
public static final String SPRING_HTTP_INTERFACE = "spring-http-interface";
105-
public static final String USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATION = "useHttpServiceProxyFactoryInterfacesConfiguration";
105+
public static final String USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATOR = "useHttpServiceProxyFactoryInterfacesConfigurator";
106106
public static final String HTTP_INTERFACES_CONFIGURATOR_DEPENDENCY = "httpInterfacesConfiguratorDependency";
107107
public static final String API_FIRST = "apiFirst";
108108
public static final String SPRING_CONTROLLER = "useSpringController";
@@ -167,7 +167,7 @@ public class SpringCodegen extends AbstractJavaCodegen
167167
protected boolean generatedConstructorWithRequiredArgs = true;
168168
@Getter @Setter
169169
protected RequestMappingMode requestMappingMode = RequestMappingMode.controller;
170-
@Setter boolean useHttpServiceProxyFactoryInterfacesConfiguration = false;
170+
@Setter boolean useHttpServiceProxyFactoryInterfacesConfigurator = false;
171171

172172
public SpringCodegen() {
173173
super();
@@ -271,7 +271,7 @@ public SpringCodegen() {
271271
generatedConstructorWithRequiredArgs));
272272
cliOptions.add(new CliOption(RESOURCE_FOLDER, RESOURCE_FOLDER_DESC).defaultValue(this.getResourceFolder()));
273273

274-
cliOptions.add(CliOption.newString(USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATION,
274+
cliOptions.add(CliOption.newString(USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATOR,
275275
"Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.")
276276
.defaultValue("false")
277277
);
@@ -452,7 +452,7 @@ public void processOpts() {
452452
}
453453

454454
convertPropertyToStringAndWriteBack(RESOURCE_FOLDER, this::setResourceFolder);
455-
convertPropertyToBooleanAndWriteBack(USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATION, this::setUseHttpServiceProxyFactoryInterfacesConfiguration);
455+
convertPropertyToBooleanAndWriteBack(USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATOR, this::setUseHttpServiceProxyFactoryInterfacesConfigurator);
456456

457457
typeMapping.put("file", "org.springframework.core.io.Resource");
458458
importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource");
@@ -537,8 +537,8 @@ public void processOpts() {
537537
}
538538
}
539539
} else if (SPRING_HTTP_INTERFACE.equals(library)) {
540-
String httpInterfacesAbstractConfiguratorFile = useHttpServiceProxyFactoryInterfacesConfiguration ?
541-
"httpServiceProxyFactoryInterfacesConfiguration.mustache" :
540+
String httpInterfacesAbstractConfiguratorFile = useHttpServiceProxyFactoryInterfacesConfigurator ?
541+
"httpServiceProxyFactoryInterfacesConfigurator.mustache" :
542542
"httpInterfacesConfiguration.mustache";
543543

544544
supportingFiles.add(new SupportingFile(httpInterfacesAbstractConfiguratorFile,
@@ -547,7 +547,7 @@ public void processOpts() {
547547
writePropertyBack(USE_BEANVALIDATION, false);
548548

549549
writePropertyBack(HTTP_INTERFACES_CONFIGURATOR_DEPENDENCY,
550-
useHttpServiceProxyFactoryInterfacesConfiguration ?
550+
useHttpServiceProxyFactoryInterfacesConfigurator ?
551551
"HttpServiceProxyFactory" :
552552
"WebClient"
553553
);

samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator-ignore renamed to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator-ignore

File renamed without changes.

samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/FILES renamed to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.openapi-generator-ignore
12
README.md
23
pom.xml
34
src/main/java/org/openapitools/api/AnotherFakeApi.java

samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/VERSION renamed to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/VERSION

File renamed without changes.

samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/README.md renamed to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/README.md

samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/pom.xml renamed to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>org.openapitools</groupId>
4-
<artifactId>spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration</artifactId>
4+
<artifactId>spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator</artifactId>
55
<packaging>jar</packaging>
6-
<name>spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration</name>
6+
<name>spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator</name>
77
<version>1.0.0-SNAPSHOT</version>
88
<properties>
99
<java.version>17</java.version>

0 commit comments

Comments
 (0)