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.

operationId breaks method names with multiple content media types #59

@hauner

Description

@hauner

for example, having the following response

paths:
  /foo:
    get:
      # operationId: get_foo
      responses:
        '200':
          description: json or plain text result
          content:
            application/json:
                schema:
                  $ref: '#/components/schemas/Foo'
            text/plain:
                schema:
                  type: string

the processor will/should normally generate two methods

    @Mapping("/foo")
    Foo getFooApplicationJson();

    @Mapping("/foo")
    String getFooTextPlain();

if the endpoint has an operationId: get_foo it overrides the method name generation, especially the media-type postfix:

    @Mapping("/foo")
    Foo getFoo();

    @Mapping("/foo")
    String getFoo();

which does not compile (same erasure getFoo()).

The processor should add the media-type postfix to the operationId if it is set.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions