Skip to content

Spring Boot Path Parameter in the Spec gets renamed into CamelCase in Code and the spec thats generated! #4870

@techlogix

Description

@techlogix
Description

Path parameter defined in the yaml spec for example "student-id" on the path and named as such in the parameter name - gets incorrectly renamed to "studentId" in the Spring Controller.

Swagger-codegen version

This is the latest version thats hooked to the editor at editor.swagger.io.

Swagger declaration file content or url
Command line used for generation
Steps to reproduce

Create any POST URI path with a path paramenter and have a name that's hypenated.

e.g. POST /students/student-id

Then generate Spring Boot - the API and Controller do not have that name for the parameter - instead it expects a Camel Case.

Related issues
Suggest a Fix

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions