Skip to content

Releases: openapi-processor/openapi-processor-spring

2021.1

Choose a tag to compare

@hauner hauner released this 14 Feb 14:00
  • jars are published on maven central (was jcenter).

  • openapi-processor/openapi-processor-core#53, add @RequestParam annotation to mapped data types if the source OpenAPI type was a simple data type, i.e. integer, number, boolean or string.

    Background: the processor did not add annotations to mapped data types because Spring doesn't need (or allow) parameter annotations for model object (pojo) parameters. In case of a (simple data type) mapping like this:

    openapi-processor-mapping: v2
    
    map:
      types:
        - type: string:uuid => java.util.UUID
    

    this simple logic fails because it assumes that the source data type is an object data type. In case of a simple source data type Spring needs the @RequestParam annotation to bind it.

  • updated openapi-processor-core to 2021.1 (was 2020.1). See the core release notes for details.

2020.1 (1.0.0)

Choose a tag to compare

@hauner hauner released this 10 Dec 22:01
  • updated openapi-processor-core to 2020.4 with a couple of bug fixes and improvements.

1.0.0.M20

1.0.0.M20 Pre-release
Pre-release

Choose a tag to compare

@hauner hauner released this 08 Nov 14:58
  • openapi-processor/openapi-processor-core#30 (core), preserve the "?" generic parameter of a mapping and pass it on to the generated api, e.g. a mapping like

    map:
      paths:
        /foo:
          parameters:
            - add: foo => io.openapiprocessor.Foo<?>

    does now generate

    void foo(Foo<?> foo);

    instead of

    void foo(Foo foo);
  • #119 (core), primitive type could match a primitive type with format mapping, e.g. with the mapping

    openapi-processor-spring: v2
    
    map:
      types:
        - type: string:binary => io.openapiprocessor.Foo
    

    it was possible that a primitive string was mapped to io.openapiprocessor.Foo instead of java.lang.String

  • (core) a ref loop with array items caused a NullPointerException

  • updated openapi-processor-core to 1.3.0 (was 1.2.1)

1.0.0.M19

1.0.0.M19 Pre-release
Pre-release

Choose a tag to compare

@hauner hauner released this 13 Oct 06:53
  • the internal representation of an empty response (ie. without any response data) leaked to the generated code. Visible by a produces = {"?"} in the mapping annotation and an Object return type of the endpoint.
  • updated openapi-processor-core to 1.2.1 (was 1.2.0)

1.0.0.M18

1.0.0.M18 Pre-release
Pre-release

Choose a tag to compare

@hauner hauner released this 11 Oct 14:26
  • add @NotNull if nullable is default (i.e. true) and bean validation is enabled.

  • openapi-processor/openapi-processor-core#20, the type mapping (v2 only) configuration allows to reference the target package-name in generic parameters using the {package-name} expression. This makes it possible to adjust the package-name without touching the mapping and it can reduce duplication if the mapping contains many generic parameters.

    openapi-processor-mapping: v2
    options:
      package-name: io.openapiprocessor.generated.model
    
    map:
      types:
        - type: FooPage => org.springframework.data.domain.Page<{package-name}.Foo>
    
  • openapi-processor/openapi-processor-core#21, a primitive type with a custom format (not defined by the OpenAPI specification) did break processing. The processor does now ignore unknown custom formats. For example the following definition

    type: string
    format: unknown-custom-format
    

    will be processed as if it has no format at all:

    type: string
    
  • openapi-processor/openapi-processor-core#22, mapping of primitive schemas did not work. It is now possible to have a primitive schema

    components:
      schemas:
        Foo:
          type: string
    

    and map this to a specific target java type:

    openapi-processor-spring: v2
    
    map:
      types:
        - type: Foo => io.openapiprocessor.sample.Foo
    
  • #23, parameter $ref's were not resolved when processing with the openapi4j parser.

  • updated openapi-processor-core to 1.2.0 (was 1.1.1)

  • updated openapi4j parser to 1.0.4 (was 1.0.3)

1.0.0.M17

1.0.0.M17 Pre-release
Pre-release

Choose a tag to compare

@hauner hauner released this 16 Sep 20:11

1.0.0.M16

1.0.0.M16 Pre-release
Pre-release

Choose a tag to compare

@hauner hauner released this 09 Aug 17:10

1.0.0.M15

1.0.0.M15 Pre-release
Pre-release

Choose a tag to compare

@hauner hauner released this 29 Jun 14:54
  • #102, simpler mapping format
  • #99, extracted core library to create processors for other frameworks (e.g. micronaut)
  • #106, changed artifact group id. New artifact coordinates: io.openapiprocessor:openapi-processor-spring:1.0.0.M15
  • new repository: https://dl.bintray.com/openapi-processor/primary

1.0.0.M14

1.0.0.M14 Pre-release
Pre-release

Choose a tag to compare

@hauner hauner released this 19 Jun 16:39

improvements

  • target java 1.8
  • improved file handling
  • updated dependencies
  • reduced dependencies

1.0.0.M13

1.0.0.M13 Pre-release
Pre-release

Choose a tag to compare

@hauner hauner released this 01 May 16:01

improvements

  • the result wrapper is no longer fixed to ResponseEntity<>. The default is no result wrapper. The endpoints now return the plain response type, e.g. String instead of ResponseEntity<String>. It is set using the result mapping.

    map:
      result:
        to: org.springframework.http.ResponseEntity
    
  • there is a new single mapping that wraps non-array like result types with the given single mapping type. It works together with the result mapping, allowing a ResponseEntity<Mono<...>> endpoint response.

    map:
      single:
        to: reactor.core.publisher.Mono
    
  • there is a new multi mapping that replaces array like result types or parameters with the given multi mapping type. For example it will replace List<String> with Flux<String> using the mapping below. It works together with the result mapping, allowing a ResponseEntity<Flux<...>> endpoint response.

    map:
      multi:
        to: reactor.core.publisher.Flux
    
  • #96, improved creation of valid java identifier for identifier names from an openapi.yaml file.