{"id":13629440,"url":"https://github.com/ignatandrei/SkinnyControllersGenerator","last_synced_at":"2025-04-17T09:33:46.065Z","repository":{"id":165059033,"uuid":"640451006","full_name":"ignatandrei/SkinnyControllersGenerator","owner":"ignatandrei","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-19T19:42:10.000Z","size":52,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-22T04:33:40.034Z","etag":null,"topics":["controller","csharp","netcore","skinny","skinny-controllers"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/SkinnyControllersGenerator","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ignatandrei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-05-14T06:04:27.000Z","updated_at":"2024-06-14T01:32:21.902Z","dependencies_parsed_at":null,"dependency_job_id":"bf190e9e-c50b-4b33-8e03-1fbdfe0c1372","html_url":"https://github.com/ignatandrei/SkinnyControllersGenerator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatandrei%2FSkinnyControllersGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatandrei%2FSkinnyControllersGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatandrei%2FSkinnyControllersGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignatandrei%2FSkinnyControllersGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ignatandrei","download_url":"https://codeload.github.com/ignatandrei/SkinnyControllersGenerator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223751123,"owners_count":17196574,"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":["controller","csharp","netcore","skinny","skinny-controllers"],"created_at":"2024-08-01T22:01:10.773Z","updated_at":"2024-11-08T20:30:56.503Z","avatar_url":"https://github.com/ignatandrei.png","language":"C#","funding_links":[],"categories":["Content"],"sub_categories":["6. [SkinnyControllersCommon](https://ignatandrei.github.io/RSCG_Examples/v2/docs/SkinnyControllersCommon) , in the [API](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#api) category"],"readme":"# SkinnyControllersGenerator\n\n\nSkinnyControllers generates controller action for each field of your controller \n\nHow to install SkinnyControllers  in a .NET Core 5 WebAPI / MVC application\nStep 1:\n\nInstall https://www.nuget.org/packages/SkinnyControllersGenerator/ \n\n\nStep 2:\n\nInstall https://www.nuget.org/packages/SkinnyControllersCommon/\n\n\nStep 3:\n\nAdd a field to your action either via DI, either directly\n\n    [ApiController]\n    [Route(\"[controller]/[action]\")]\n    public partial class WeatherForecastController : ControllerBase\n    {\n\n        private readonly RepositoryWF repository;\n        \n        public WeatherForecastController(RepositoryWF repository)\n        {\n            this.repository = repository;            \n            //or make\n\t\t\t//this.repository=new RepositoryWF();\n        }\n\n\t\t\n\nStep 4:\n\n\tAdd partial declaration and decorate your controller with \n\n\t[AutoActions(template = TemplateIndicator.AllPost,FieldsName =new[] { \"*\" }, ExcludeFields =new[]{\"_logger\"})]\n    [ApiController]\n    [Route(\"[controller]/[action]\")]\n    public partial class WeatherForecastController : ControllerBase\n\nYou can choose your template from \n1. All Post\n2. Get - if not arguments, POST else\n3. Rest action\n\nYou can add your template in 2 ways:\n//if custom template , hte name must end in controller.txt\n1. [AutoActions(template = TemplateIndicator.CustomTemplateFile, FieldsName = new[] { \"*\" } ,CustomTemplateFileName = \"Controllers\\\\CustomTemplate1.controller.txt\")]\n\n2. For creating new generic templates, please PR to https://github.com/ignatandrei/SkinnyControllersGenerator\n\nThat's all!\n\n\nUsual problems:\n\n1.  error CS0260: Missing partial modifier on declaration of type \n\nAnswer:\n\nDid you put partial on the controller declaration ? \n\npublic partial class \n\n\n# More Roslyn Source Code Generators\n\nYou can find more RSCG with examples at [Roslyn Source Code Generators](https://ignatandrei.github.io/RSCG_Examples/v2/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignatandrei%2FSkinnyControllersGenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fignatandrei%2FSkinnyControllersGenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignatandrei%2FSkinnyControllersGenerator/lists"}