Releases: openapi-processor/openapi-processor-spring
2024.6
2024.5
2024.4
2024.3
2024.2
2024.1
this release brings
- support for annotation mapping with OpenAPI extensions, i.e.
x-
properties on schema properties. - support for annotation mapping by parameter name.
- a fix for bean validation with reactive types (#229), i.e. the
@Valid
is now placed on the reactive type and not on the wrapped typed. (breaking, can be disabled) result
wrapper can be configured to createMono<ResponseEntity<Mono<...>>>
(#239)- small improvement in camel case identifier generation, i.e. a character after a number is now upper case. (breaking, can be disabled)
See the core release notes 2024.2 for the details.
dependency updates
- updated openapi-processor-core to 2024.2
2023.6.1
2023.6
this release brings improved enum support.
It can be used to fix conversion issues (see #198) when enums are used as parameters (i.e not as part of the request body).
See the core release notes 2023.6 for the basic details.
openapi-processor-mapping: v5
options:
package-name: generated
enum-type: framework
openapi-processor-spring supports the framework
enum-type
.
It generates a Java enum class similar to the default
enum type. In addition it generates a Spring ConverterFactory
that Spring can use to convert incoming enum values to its corresponding java enum value (if passed as a parameter, not as part of the body).
To enable the ConverterFactory
, create a configuration class like this:
package io.openapiprocessor.samples;
import {package-name}.spring.StringToEnumConverterFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebConfig implements WebMvcConfigurer {
@SuppressWarnings("rawtypes")
@Override
public void addFormatters(FormatterRegistry registry) {
registry.addConverterFactory(new StringToEnumConverterFactory());
}
}
This registration is one time task. The converter factory does create an enum converter for all generated enum classes.
There is a sample is using different enum-type
configurations (string
& framework
).
dependency updates
- updated openapi-processor-core to 2023.6
2023.5
2023.4
this release brings a few improvements
- json schema validation for OpenAPI 3.1
- mappings with generic wildcard
See the core release notes 2023.4 for a detailed description of the changes.
#192 missing import
Spring doesn't have shortcut annotations, e.g. @GetMapping
instead of @RequestMapping(..., method = RequestMethod.HEAD)
for the http methods HEAD, OPTIONS & TRACE.
The processor does now add the missing import of RequestMethod
.
dependency updates
- updated openapi-processor-core to 2023.4 (was 2023.3)