Skip to content

Move Paths from Controllers into a single file #34

@Valefant

Description

@Valefant

The current paths are nested in an companion object within every controller.

For example in the HelpProviderController we have the following structure

companion object {
    const val PATH_HELP_PROVIDERS = "help-providers"
    const val PATH_HELP_REQUESTERS = "help-requesters"
    const val PATH_ACCEPT_EMERGENCY = "accept-emergency"
}

To avoid duplications across all controllers we want to gather them into a single file.


Implementation Notes
The file should be placed in the package org.oso.config.

The resulting structure should have this form

object Paths {
    object Emergency {
        const val ROOT = "emergency"
        const val EMIT = "emit"
        const val ACCEPT = "accept"
    }

    ...
}

And then could be used like this

@Controller
@RequestMapping(Paths.Emergency.ROOT)
class EmergencyController

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions