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

does not generate model class if it is only referenced in a type mapping #50

Closed
@hauner

Description

@hauner

Having an openapi description with a model schema that is not directly referenced anymore after considering the mappings, is not generated even if it still referenced by a mapping.

This can happen if the there is a paged response that is mapped to the Spring framework Page class and there is no other endpoint that uses the page content type.

map:
  types:
    - type: FooPage => org.springframework.data.domain.Page<generated.model.Foo>

The details of the mapped openapi schema (which describes the page response in this case) are not considered anymore. It is replaced by the mapping so there is no need to generate the page content type.

The processor should recognize that the type is used and should generate the type.

Workaround:

a possible workaround is to create a dummy schema under components.schemas that references the missing type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions