Skip to content

drop parameter with a type name that contains "-" is not working #365

@adzubla

Description

@adzubla

The "unnecessary parameter" drop configuration (https://openapiprocessor.io/spring/mapping/parameter.html#_unnecessary_parameter) does no work if the parameter name contains a dash:

Example mapping:

openapi-processor-mapping: v13

options:
  javadoc: true
  format-code: false
  bean-validation: jakarta
  model-type: default
  enum-type: string

map:
  paths:
    /foo:
      parameters:
        - drop: foo-bar

Breaks with this error:

[ERROR] Failed to execute goal io.openapiprocessor:openapi-processor-maven-plugin:2024.1:process (migration-openapi) on project migration: Execution failed - openapi-processor-spring: failed to run openapi-processor-spring! failed to parse 'mapping.yaml' configuration! failed to parse mapping: foo-bar: mismatched input 'foo-bar' expecting {'byte', 'short', 'int', 'long', 'float', 'double', 'boolean', 'char', 'plain', Identifier, QualifiedType, String, ContentType}: InputMismatchException -> [Help 1]

Using parameter name "foobar" works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions