April 2026
-
openapi-processor-spring/micronaut 2026.3
openapi-processor-spring: @HttpExchange based interfaces
Spring Boot provides two annotation families
-
the standard mapping annotations, i.e.,
@RequestMapping,@GetMappingand friends to define server side controllers -
and the new exchange (HTTP service clients) annotations, i.e.,
@HttpExchange,@GetExchangeand friends to define server side controllers and http clients based on the same interface.
This makes it possible to use the endpoint interfaces generated by openapi-processor-spring to call the endpoints. Spring does generate (with a few lines of configuration) the boilerplate code that is required to to call the api endpoints.
Switching between both annotation families is done in the mapping.yaml:
openapi-processor-spring: v1 (1)
options:
package-name: io.openapiprocesser
spring: (2)
# default, i.e., mapping annotations
#annotations: mapping
# use exchange annotations
annotations: exchange (3)
There are a few things that are important here:
| 1 | the mapping identifier has changed. It is now expecting openapi-processor-spring instead of openapi-processor-mapping. The processor will still accept openapi-processor-mapping.
The new identifier is required to get proper editing support for the new option with the IntelliJ plugin. |
| 2 | a new Spring specific section in the options object. |
| 3 | the annotation family: mapping or exchange. With mapping being the default. |
The openapi-processor-samples repository has a sample that provides an api endpoint and calls itself using the @HttpExchange based interface.
fixed a stack overflow error
combining a property like payload
MyRequest:
type: object
properties:
payload:
type: string
format: byte
with a type mapping and enabling bean validation
openapi-processor-mapping: v17
options:
package-name: ....
bean-validation: jakarta
map:
types:
- type: string:byte => byte[]
caused a stack overflow error.