Http DSL: Detect path nested in path, which is wrong
Open
Nobody has claimed this yet.
1 - triaged
- Dominant language
- Scala
- Stars
- 1.4k
- Forks
- 584
- Avg merge
- 14h 33m
- Merged PRs (30d)
- 24
Description
Issue by ktoso
Friday Oct 09, 2015 at 09:30 GMT
Originally opened as https://github.com/akka/akka/issues/18686
Maybe we can figure out a way of warning people when a path directive is nested in a path directive.
The problem is that it won't match "as people might expect" then.
See below:
// path("auth") { // BAD
pathPrefix("auth") { // GOOD
path("never") { complete("") } ~
path("always") { complete("Welcome to the secret place!") }
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Http DSL path and pathPrefix directives shown in the example, focusing on how a path directive nested inside another path directive is handled. Define and implement a warning for the invalid nesting, then verify that the pathPrefix example remains valid and that path("auth") is reported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100