Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #1385
Closed
Open
Issue created Nov 06, 2018 by Administrator@rootContributor

[SPRING] Create constants for paths

Created by: adrianiacobghiula

Description

It would be better to generate constants for the paths (in an apiRoute interface) String FIND_PET_BY_STATUS_URL = "/pet/findByStatus";

@RequestMapping(value = PetApiRoute.FIND_PET_BY_STATUS_URL,

This could be helpful : for testing using mockMvc to to add the constant. for adding the URL in the spring security antMatchers or anywhere you need the actual URL

Suggest a fix/enhancement

Adding a apiRoute.mustache {{#operations}} public interface {{classname}}Route { {{#operation}} String {{operationIdSnakeCase.toUpperCase}}_URL = "{{{path}}}"; {{/operation}} } {{/operations}}

And @RequestMapping(value = {{classname}}Route.{{operationIdSnakeCase.toUpperCase}}_URL,

might be enough

Assignee
Assign to
Time tracking