{"id":13339950,"url":"https://github.com/tpluscode/Nancy.Routing.UriTemplates","last_synced_at":"2025-03-11T15:31:54.366Z","repository":{"id":82631291,"uuid":"73633925","full_name":"tpluscode/Nancy.Routing.UriTemplates","owner":"tpluscode","description":"Using URI Templates aka RFC 6570 for routing in Nancy","archived":false,"fork":false,"pushed_at":"2019-08-18T17:23:57.000Z","size":188,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T21:45:44.688Z","etag":null,"topics":["nancy","rest-api","routing","uri-template"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpluscode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-13T18:16:12.000Z","updated_at":"2023-09-08T17:17:04.000Z","dependencies_parsed_at":"2023-03-12T16:19:13.744Z","dependency_job_id":null,"html_url":"https://github.com/tpluscode/Nancy.Routing.UriTemplates","commit_stats":{"total_commits":32,"total_committers":1,"mean_commits":32.0,"dds":0.0,"last_synced_commit":"8cda9d3fe46e2676a208f0dd8c2b0aee2013fe30"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpluscode%2FNancy.Routing.UriTemplates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpluscode%2FNancy.Routing.UriTemplates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpluscode%2FNancy.Routing.UriTemplates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpluscode%2FNancy.Routing.UriTemplates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpluscode","download_url":"https://codeload.github.com/tpluscode/Nancy.Routing.UriTemplates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243059713,"owners_count":20229622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nancy","rest-api","routing","uri-template"],"created_at":"2024-07-29T19:21:23.042Z","updated_at":"2025-03-11T15:31:52.269Z","avatar_url":"https://github.com/tpluscode.png","language":"C#","readme":"![trail icon](https://raw.githubusercontent.com/tpluscode/Nancy.Routing.UriTemplates/master/assets/noun_27516.png)\n\n# Nancy.Routing.UriTemplates [![Build status][av-badge]][build] [![NuGet version][nuget-badge]][nuget-link] [![codecov.io][cov-badge]][cov-link] [![codefactor][codefactor-badge]][codefactor-link]\n\nUsing [URI Templates aka RFC 6570](https://tools.ietf.org/html/rfc6570) for routing in Nancy. \n\n## Introduction\n\nYou can use URI Templates to define routes in Nancy.\n\n``` c#\npublic class PeopleModule : Nancy.Routing.UriTemplates.UriTemplateModule\n{\n    public PeopleModule()\n    {\n        // by default you'll be creating typical routes\n        Get(\"person/{id}\", p =\u003e GetModel(p.id));\n            \n        // and URI Templates are opt-in\n        using(Templates)\n        {\n            Get(\"people{;include}{/page}{?name}\", p =\u003e GetPeople(p.include, p.page, p.name));\n        }\n    }\n}\n```\n\nThe second route will for example match a request to `people;include=hobbies,friends/4?name=Tomasz`\n\nAs you can see, URI Templates give more expressive syntax:\n\n* variables can be extracted not only from segments but also other URI parts including query strings (`{?name}`) and path parameters (`{;include}`)\n* all variables can have multiple values\n\nFinally, URI Templates can also be used outside routing to mint identifiers. For example to used them as links in a REST API.\n\n## More\n\nSee some discussion here: http://t-code.pl/blog/2016/11/Towards-server-side-routing-with-URI-Templates/\n\n[The icon](https://thenounproject.com/term/trail/27516/) desiged by [Gabriele Debolini](http://thenounproject.com/gabriele.debolini/) from [The Noun Project](http://thenounproject.com/)\n\n[av-badge]: https://ci.appveyor.com/api/projects/status/so0uk5kw89371b3f?svg=true\n[build]: https://ci.appveyor.com/project/tpluscode78631/nancy-routing-uritemplates/branch/master\n[nuget-badge]: https://badge.fury.io/nu/nancy.Routing.UriTemplates.svg\n[nuget-link]: https://badge.fury.io/nu/nancy.Routing.UriTemplates\n[cov-badge]: https://codecov.io/github/tpluscode/Nancy.Routing.UriTemplates/coverage.svg?branch=master\n[cov-link]: https://codecov.io/github/tpluscode/Nancy.Routing.UriTemplates?branch=master\n[codefactor-badge]: https://www.codefactor.io/repository/github/tpluscode/Nancy.Routing.UriTemplates/badge/master\n[codefactor-link]: https://www.codefactor.io/repository/github/tpluscode/Nancy.Routing.UriTemplates/overview/master\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpluscode%2FNancy.Routing.UriTemplates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpluscode%2FNancy.Routing.UriTemplates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpluscode%2FNancy.Routing.UriTemplates/lists"}