[java-play-framework] correct routes to controllers not set when using api-package name

Open
#8,675 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
java
Domain
api, backend

Research direction

Start with the Java Play Framework generator's handling of the -api-package option and the generated routes file. Compare the route output with and without the package option, then trace where the controller package is assembled. Done means generated routes include com.awesone.acme.api.controllers for the controller references.

Written by the indexing model from the issue text.

Description

When using the api-package option the package path is not set in the routes file.

eg, when using the switch
... -api-package com.awesone.acme.api

I expect the routes file to read
GET /awesomeEndpoint/ com.awesone.acme.api.controllers.AwesomeController.getAwesomeStuff()

But instead it reads:

GET /awesomeEndpoint/ controllers.AwesomeController.getAwesomeStuff()

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from swagger-api/swagger-codegen

All issues in swagger-api/swagger-codegen

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.