Skip to content

[Micronaut server] Change @Controller annotation #12058

Closed
@pbthorste

Description

@pbthorste
Description

The Micronaut server generator controller classes have this annotation at the top

@Controller("${context-path}")
openapi-generator version

latest, 5.4.0

OpenAPI declaration file content or url

Link to file:
https://github.com/OpenAPITools/openapi-generator/blob/edfb3e123f0d3ad48992e158da957e87c3b8c3fe/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache

Suggest a fix/enhancement

I think it would be preferable to change this to:

@Controller

In micronaut you can configure a global context path in config, and the current method forces you to set a context-path in config you very likely dont need.

@andriy-dmytruk

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions