mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-10 09:26:11 +00:00
adding support for @ResponseStatus annotation into spring-http-interface java spring generator (#20071)
* adding support for useResponseEntity into spring-http-interface java spring generator * adding samples for @StatusResponse into spring-http-interface java spring generator * additional changes to sample additional changes to samples jdk17 * adding sample files * extra adjustments * fixing generator version * fixing status code in samples * some rollback * some rollback 2
This commit is contained in:
committed by
GitHub
parent
d7a23a9fcf
commit
b44ba666aa
@@ -0,0 +1,21 @@
|
||||
# OpenAPI generated API stub
|
||||
|
||||
[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface)
|
||||
|
||||
|
||||
## Overview
|
||||
This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
|
||||
By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
|
||||
This is an example of building API stub interfaces in Java using the Spring framework.
|
||||
|
||||
The stubs generated can be used in your existing Spring application for HTTP integration with other REST services
|
||||
To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `WebClient` instance via constructor
|
||||
```java
|
||||
@Configuration
|
||||
public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator {
|
||||
|
||||
public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance
|
||||
super(myWebClient);
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user