-
-
Notifications
You must be signed in to change notification settings - Fork 7k
spring-http-interface: introduce springHttpClientAdapter
, fix paramDoc.mustache
#19710
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
Open
ibaranga
wants to merge
22
commits into
OpenAPITools:master
Choose a base branch
from
ibaranga:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
814ee9b
spring-http-interface: introduce `springHttpClientAdapter`, fix `para…
ibaranga f1bbe1b
fix imports
ibaranga 4e03298
Update SpringCodegen.java
ibaranga 0f9bfb1
fix docs and default value
ibaranga 33649f3
Merge remote-tracking branch 'origin/master'
ibaranga c85e8cd
Merge remote-tracking branch 'myfork/master'
ibaranga 4c3bdae
fix docs and default value
ibaranga 277c928
Merge remote-tracking branch 'origin/master'
ibaranga 6addc9a
revert to HttpServiceProxyFactory.builder for backward compatibility
ibaranga 21e024a
Merge remote-tracking branch 'origin/master'
ibaranga 1ab55cd
Merge remote-tracking branch 'origin/master'
ibaranga 0cd4f75
Merge remote-tracking branch 'origin/master'
ibaranga 6a55e5d
spring-http-interface: introduce `useHttpServiceProxyFactoryInterface…
ibaranga d84e5f3
Merge remote-tracking branch 'origin/master'
ibaranga 02bb3c7
spring-http-interface: introduce `useHttpServiceProxyFactoryInterface…
ibaranga c79efb9
spring-http-interface: introduce `useHttpServiceProxyFactoryInterface…
ibaranga 79fbb71
spring-http-interface: fix generated files
ibaranga 176322a
Merge remote-tracking branch 'origin/master'
ibaranga 71e28b3
remove unnecessary imports from httpServiceProxyFactoryInterfacesConf…
ibaranga 3de14ae
Merge branch 'OpenAPITools:master' into master
ibaranga 6408374
remove unnecessary paramDoc.mustache, update `useHttpServiceProxyFact…
ibaranga ba281f4
Merge remote-tracking branch 'origin/master'
ibaranga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
package {{configPackage}}; | ||
|
||
{{#apiInfo}} | ||
{{#apis}} | ||
import {{apiPackage}}.{{classname}}; | ||
{{/apis}} | ||
{{/apiInfo}} | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.web.client.RestClient; | ||
import org.springframework.web.client.support.RestClientAdapter; | ||
import org.springframework.web.service.invoker.HttpServiceProxyFactory; | ||
|
||
public abstract class HttpInterfacesAbstractConfigurator { | ||
|
||
private final RestClient restClient; | ||
|
||
public HttpInterfacesAbstractConfigurator(final RestClient restClient) { | ||
this.restClient = restClient; | ||
} | ||
|
||
{{#apiInfo}} | ||
{{#apis}} | ||
@Bean(name = "{{configPackage}}.HttpInterfacesAbstractConfigurator.{{classVarName}}") | ||
{{classname}} {{classVarName}}HttpProxy() { | ||
HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(restClient)).build(); | ||
return factory.createClient({{classname}}.class); | ||
} | ||
|
||
{{/apis}} | ||
{{/apiInfo}} | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
...vaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
package {{configPackage}}; | ||
|
||
{{#apiInfo}} | ||
{{#apis}} | ||
import {{apiPackage}}.{{classname}}; | ||
{{/apis}} | ||
{{/apiInfo}} | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.web.client.RestTemplate; | ||
import org.springframework.web.client.support.RestTemplateAdapter; | ||
import org.springframework.web.service.invoker.HttpServiceProxyFactory; | ||
|
||
public abstract class HttpInterfacesAbstractConfigurator { | ||
|
||
private final RestTemplate restTemplate; | ||
|
||
public HttpInterfacesAbstractConfigurator(final RestTemplate restTemplate) { | ||
this.restTemplate = restTemplate; | ||
} | ||
|
||
{{#apiInfo}} | ||
{{#apis}} | ||
@Bean(name = "{{configPackage}}.HttpInterfacesAbstractConfigurator.{{classVarName}}") | ||
{{classname}} {{classVarName}}HttpProxy() { | ||
HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestTemplateAdapter.create(restTemplate)).build(); | ||
return factory.createClient({{classname}}.class); | ||
} | ||
|
||
{{/apis}} | ||
{{/apiInfo}} | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is marked as deprecated, replacing it with
builderFor
, which is also in line with the rest of thehttpInterfaces*Configuration.mustache
templates