Skip to content

Releases: openapi-processor/openapi-processor-spring

2023.6

26 Nov 16:55
Compare
Choose a tag to compare

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

29 Oct 16:14
Compare
Choose a tag to compare

this release brings support for primitive types in mappings.

See the core release notes 2023.5 for more.

dependency updates

  • updated openapi-processor-core to 2023.5 (was 2023.4)

2023.4

17 Sep 13:26
Compare
Choose a tag to compare

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)

2023.3

03 Jul 21:46
Compare
Choose a tag to compare

this release includes two new features

  • add an annotation with a single mapping to all generated model classes
  • generate java record s instead of pojo classes.

See the core release notes 2023.3 for a detailed description of the changes.

dependency updates

  • updated openapi-processor-core to 2023.3 (was 2023.2.2)

2023.2.2

15 Jun 06:50
Compare
Choose a tag to compare

this release includes another fix to avoid generating a getClass() method.

See the core release notes 2023.2.2 for a detailed description of the changes.

dependency updates

  • updated openapi-processor-core to 2023.2.2 (was 2023.2.1)

2023.2.1

14 Jun 06:40
Compare
Choose a tag to compare

this release includes few bug fixes related to bad identifiers and a missing model class.

See the core release notes 2023.2.1 for a detailed description of the changes.

dependency updates

  • updated openapi-processor-core to 2023.2.1 (was 2023.2)

2023.2

02 Jun 07:09
Compare
Choose a tag to compare

this release includes few of mapping improvements: it is now possible to create a mapping with nested generic types and annotation mapping allows class types (e.g. package.Foo.class) as parameter.

See the core release notes 2023.2 for a detailed description of the changes.

dependency updates

  • updated openapi-processor-core to 2023.2 (was 2023.1.2)

2023.1.2

24 Jan 07:16
Compare
Choose a tag to compare

this fixes additional parameters in combination with bean validations.

See the core release notes 2023.1.2 for a detailed description of the changes.

2023.1.1

03 Jan 17:58
Compare
Choose a tag to compare

this fixes the bad internal openapi-parser dependency that broke 2023.1

See v2023.1 for the changes.

2023.1

02 Jan 17:24
Compare
Choose a tag to compare

this release includes a couple of mapping improvements for bean validations & annotation mapping. Both will work on mapped types. It also brings bean validation v3 support for Spring Boot 3.

See the core release notes 2023.1 for a detailed description of the changes.

dependency updates

  • updated openapi-processor-core to 2023.1 (was 2022.6)