Title: Add support for named routes · Issue #20 · JavaWebStack/http-router · GitHub
Open Graph Title: Add support for named routes · Issue #20 · JavaWebStack/http-router
X Title: Add support for named routes · Issue #20 · JavaWebStack/http-router
Description: Add a name parameter to routing annotations such as @Get etc. This would allow us generate absolute or relative URLs by name and change URLs with less impact on other parts of an application. In addition this could also be used to pre-va...
Open Graph Description: Add a name parameter to routing annotations such as @Get etc. This would allow us generate absolute or relative URLs by name and change URLs with less impact on other parts of an application. In ad...
X Description: Add a name parameter to routing annotations such as @Get etc. This would allow us generate absolute or relative URLs by name and change URLs with less impact on other parts of an application. In ad...
Opengraph URL: https://github.com/JavaWebStack/http-router/issues/20
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support for named routes","articleBody":"Add a name parameter to routing annotations such as `@Get` etc.\r\nThis would allow us generate absolute or relative URLs by name and change URLs with less impact on other parts of an application. In addition this could also be used to pre-validate path parameters and create even safer applications.\r\n\r\n## Examples\r\n```java\r\n@PathPrefix(\"/api/users\")\r\npublic class UserController {\r\n @Get(\"/{String:name}\", name=\"greetUser\")\r\n public String greet(@Path(\"name\") String name) {\r\n return \"Hello \" + name;\r\n }\r\n}\r\n\r\n// In other parts of the application\r\nserver.makeRoute(\"greetUser\", \"JanHolger\"); -\u003e /api/users/JanHolger\r\n```","author":{"url":"https://github.com/x7airworker","@type":"Person","name":"x7airworker"},"datePublished":"2023-02-20T18:43:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/20/http-router/issues/20"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c2536ff0-2640-c8ac-efb3-9420412683a3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E37A:471C3:38ACDE6:49F2C0B:697D8971 |
| html-safe-nonce | eb0a382886ed370abbc76a8c1e4bc347be13c3bac9ff937b425089a7a89ddb51 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzdBOjQ3MUMzOjM4QUNERTY6NDlGMkMwQjo2OTdEODk3MSIsInZpc2l0b3JfaWQiOiIxMzQ2ODc3NDUyMjA5MDUzMjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 78ff0b00b202e8267833d17aef8d7945f5738e48fcc671a5239a3bc7a385d706 |
| hovercard-subject-tag | issue:1592309325 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaWebStack/http-router/20/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4991b9bcdbab0960c185916f129b56345a46ff82c2d5afe38947f5907dc986a2/JavaWebStack/http-router/issues/20 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4991b9bcdbab0960c185916f129b56345a46ff82c2d5afe38947f5907dc986a2/JavaWebStack/http-router/issues/20 |
| og:image:alt | Add a name parameter to routing annotations such as @Get etc. This would allow us generate absolute or relative URLs by name and change URLs with less impact on other parts of an application. In ad... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | x7airworker |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaWebStack/http-router git https://github.com/JavaWebStack/http-router.git |
| octolytics-dimension-user_id | 73674659 |
| octolytics-dimension-user_login | JavaWebStack |
| octolytics-dimension-repository_id | 308482890 |
| octolytics-dimension-repository_nwo | JavaWebStack/http-router |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 308482890 |
| octolytics-dimension-repository_network_root_nwo | JavaWebStack/http-router |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width