{"id":21813556,"url":"https://github.com/vahidn/apiurlsgenerator","last_synced_at":"2025-07-10T15:37:43.305Z","repository":{"id":61643882,"uuid":"553486187","full_name":"VahidN/ApiUrlsGenerator","owner":"VahidN","description":"This library will help you to convert your `stringly typed` API URL's to strongly typed ones","archived":false,"fork":false,"pushed_at":"2023-08-10T10:54:57.000Z","size":208,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T13:41:01.893Z","etag":null,"topics":["asp-net-core","aspnetcore","blazor","blazor-webassembly"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VahidN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://coffeebede.ir/%D9%88%D8%AD%D9%8A%D8%AF%D9%86%D8%B5%D9%8A%D8%B1%D9%8A","https://www.buymeacoffee.com/vahidn"]}},"created_at":"2022-10-18T09:38:27.000Z","updated_at":"2024-04-30T17:30:54.000Z","dependencies_parsed_at":"2024-11-27T15:01:19.523Z","dependency_job_id":null,"html_url":"https://github.com/VahidN/ApiUrlsGenerator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VahidN%2FApiUrlsGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VahidN%2FApiUrlsGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VahidN%2FApiUrlsGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VahidN%2FApiUrlsGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VahidN","download_url":"https://codeload.github.com/VahidN/ApiUrlsGenerator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248796156,"owners_count":21162912,"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":["asp-net-core","aspnetcore","blazor","blazor-webassembly"],"created_at":"2024-11-27T14:29:57.569Z","updated_at":"2025-04-13T23:31:12.532Z","avatar_url":"https://github.com/VahidN.png","language":"C#","funding_links":["https://coffeebede.ir/%D9%88%D8%AD%D9%8A%D8%AF%D9%86%D8%B5%D9%8A%D8%B1%D9%8A","https://www.buymeacoffee.com/vahidn"],"categories":[],"sub_categories":[],"readme":"# API URL's Generator\n\n\u003cp align=\"left\"\u003e\n  \u003ca href=\"https://github.com/VahidN/ApiUrlsGenerator\"\u003e\n     \u003cimg alt=\"GitHub Actions status\" src=\"https://github.com/VahidN/ApiUrlsGenerator/workflows/.NET%20Core%20Build/badge.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nThis library will help you to convert your `stringly typed` API URL's to strongly typed ones.\n\nTo use it, first add its package to your ASP.NET Core Web-API application:\n\n[![Nuget](https://img.shields.io/nuget/v/ApiUrlsGenerator)](http://www.nuget.org/packages/ApiUrlsGenerator/)\n\n```Console\ndotnet add package ApiUrlsGenerator\n```\n\nThen add its services to your services registration pipeline:\n\n```C#\n#if DEBUG\nbuilder.Services.AddApiUrlsGenerator(options =\u003e\n                                     {\n                                         options.OutputFolder = @\"..\\Shared\";\n                                         options.OutputFileName = \"ApiUrls.cs\";\n                                         options.DefaultNamespace = \"StronglyTypedApiUrls\";\n                                     });\n#endif\n```\n\nWith the above settings, a new `OutputFileName` file will be created in the `OutputFolder` and this new class has the specified `DefaultNamespace` namespace.\nNote: if the `OutputFolder` doesn't exist, nothing will happen.\n\nAfter adding the above settings, run the application to create the `ApiUrls.cs` file.\nNote: After each changes to the route definitions of your action methods, you should run the application to update `ApiUrls.cs` file automatically.\nNow instead of writing a URL like:\n\n```C#\nvar secretUrl = \"api/WeatherForecast/_secretUrl\";\n```\n\nYou can replace it with a compiler/refactoring friendly version:\n\n```C#\nvar secretUrl = ApiUrls.WeatherForecast.HttpGet.SecretUrl;\n```\n\nHere you can find a [sample controller](tests/ApiUrlsGenerator.HostedBlazorWasm/Server/Controllers/WeatherForecastController.cs) and [another one](tests/ApiUrlsGenerator.HostedBlazorWasm/Server/Areas/Test/Controllers/WeatherForecastController.cs) in a new area, with the generated [ApiUrls.cs](tests/ApiUrlsGenerator.HostedBlazorWasm/Shared/ApiUrls.cs) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvahidn%2Fapiurlsgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvahidn%2Fapiurlsgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvahidn%2Fapiurlsgenerator/lists"}