Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option override the path config in nested routes #190

Closed
jeevatkm opened this issue Jun 22, 2018 · 1 comment
Closed

Add option override the path config in nested routes #190

jeevatkm opened this issue Jun 22, 2018 · 1 comment
Assignees
Labels
Projects

Comments

@jeevatkm
Copy link
Member

The goal is to added an option to override the path config on nested routes.

Current behavior:

  • Inherits parent path config as-is if child one is not defined otherwise prefixes parent path with child path

This enhancement:

  • Adds an option to override the path value without parent prefix using symbol ^

Example:

api_v1 {
    path = "/v1"
    auth = "anonymous"

    routes {
        all_values {
            path = "/values"
            controller = "v1/ValueController"
            action = "List"

            routes {
                value_create {                  # /v1/values
                    method = "POST"
                }
                value_override_path {           # /v1/supervalues <==> /v1/values
                    path = "^/v1/supervalues"                    
                }
                value_get {                     # /v1/values/:key      
                    path = "/:key"

                    routes {                  
                        value_update {          # /v1/values/:key
                            method = "PUT"
                        }
                        value_delete {          # /v1/values/:key
                            method = "DELETE"
                        }
                    }
                }
            }
        } # end - all_values
    }
} # end - api_v1
@jeevatkm jeevatkm added enhancement lib-router Request Routing labels Jun 22, 2018
@jeevatkm jeevatkm added this to the v0.11.0 Milestone milestone Jun 22, 2018
@jeevatkm jeevatkm self-assigned this Jun 22, 2018
@jeevatkm jeevatkm added this to v0.11.0 - Iteration in aah Roadmap via automation Jun 22, 2018
@jeevatkm jeevatkm moved this from v0.11.0 - Iteration to v0.11.0 - In Progress in aah Roadmap Jun 22, 2018
@jeevatkm
Copy link
Member Author

Its done 😄

aah Roadmap automation moved this from v0.11.0 - In Progress to v0.11.0 - Completed Jun 22, 2018
@jeevatkm jeevatkm moved this from v0.11.0 - Completed to Released to Audience in aah Roadmap Jul 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
aah Roadmap
  
Released to Audience
Development

No branches or pull requests

1 participant