Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

2022.4

Choose a tag to compare

@hauner hauner released this 18 Apr 15:07
· 2 commits to 2022.4.x since this release

#92, processor does not handle empty schema

it is now possible (and necessary) to create a type mapping for an empty schema if the type is needed. Having an OpenAPI fragment like this

components:
  schemas:
    Empty: {}

the processor does not generate an Empty class (the schema has no object properties and it assumes that it is not necessary to create a model class for it) but the type Empty could still be referenced by another type (e.g. as property).

To avoid compilation errors it is necessary to add a type mapping for Empty:

openapi-processor-mapping: v2

options:
  package-name: generated

map:
  types:
    - type: Empty => java.lang.Object

#91, model-name-suffix was not properly supported on generic parameters

having a type mapping with a generated generic parameter (i.e Foo in the example) in combination with model-name-suffix

openapi-processor-mapping: v2

options:
  package-name: generated
  model-name-suffix: Resource

map:
  types:
    - type: FooPage => org.springframework.data.domain.Page<{package-name}.model.Foo>

did ignore the model-name-suffix on the generic parameter and failed to generate the FooResource model.