{"id":22700576,"url":"https://github.com/meir017/documentation-generator","last_synced_at":"2025-03-29T19:12:09.286Z","repository":{"id":265258337,"uuid":"895610044","full_name":"Meir017/documentation-generator","owner":"Meir017","description":"Generate code examples for your C# API using your C# code","archived":false,"fork":false,"pushed_at":"2024-11-28T16:30:32.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T19:47:10.584Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Meir017.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":"2024-11-28T14:28:35.000Z","updated_at":"2024-11-28T16:30:36.000Z","dependencies_parsed_at":"2024-11-28T15:45:10.786Z","dependency_job_id":null,"html_url":"https://github.com/Meir017/documentation-generator","commit_stats":null,"previous_names":["meir017/documentation-generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meir017%2Fdocumentation-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meir017%2Fdocumentation-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meir017%2Fdocumentation-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meir017%2Fdocumentation-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Meir017","download_url":"https://codeload.github.com/Meir017/documentation-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246230541,"owners_count":20744349,"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":[],"created_at":"2024-12-10T06:16:11.489Z","updated_at":"2025-03-29T19:12:09.261Z","avatar_url":"https://github.com/Meir017.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Documentation Generator\n\nGenerate code examples for your C# API using your C# code, this will ensure that your code examples in your documentation comments are valid.\n\n⚠️ This is an idea for a tool, no implementation yet, Please share your feedback here https://github.com/Meir017/documentation-generator/discussions/1 ⚠️\n\nThe idea is to wrap the example code with `#region ID` and `#endregion`.\nwhere the ID follows the format https://github.com/dotnet/csharpstandard/blob/standard-v6/standard/documentation-comments.md#d42-id-string-format\n\nfor example - \n\n`MyClass.cs`:\n```csharp\nnamespace MyService;\n\npublic class MyClass\n{\n    /// \u003csummary\u003e\n    /// method summary\n    /// \u003cexample\u003e\n    /// this-will-be-generated\n    /// \u003c/example\u003e\n    /// \u003c/summary\u003e\n    /// \u003cparam name=\"a\"\u003e...\u003c/param\u003e\n    /// \u003creturns\n    public int MyMethod(int a, int b);\n}\n```\n\n`MyClassDocs.cs`:\n```csharp\npublic class MyClassDocs\n{\n    public void TheMethodAdd()\n    {\n        var myClass = new MyClass();\n#region M:MyService.MyClass.MyMethod(System.Int32,System.Int32);\n        var result = myClass.MyMethod(1, 2);\n        Assert.Equal(result, 42);\n#endregion\n    }\n}\n```\n\nwill modify the source code's comment:\n\n```csharp\nnamespace MyService;\n\npublic class MyClass\n{\n    /// \u003csummary\u003e\n    /// method summary\n    /// \u003cexample\u003e\n    /// var result = theClass.MyMethod(1, 2);\n    /// Assert.Equal(42, result);\n    /// \u003c/example\u003e\n    /// \u003c/summary\u003e\n    /// \u003cparam name=\"a\"\u003e...\u003c/param\u003e\n    /// \u003creturns\n    public int MyMethod(int a, int b);\n}\n```\n\n## Installation\n\n```bash\ndotnet tool install DocumentationGenerator.Tool --global\n```\n\n## Usage:\n\nusing the dotnet tool `documentation-generator`\n\n```bash\ndotnet documentation-generator --source-code ./src/Component --documentation ./docs/Component.Docs\n```\n\n## Sample project structure\n\n- src\n  - Component\n- docs\n  - Component.Docs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeir017%2Fdocumentation-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeir017%2Fdocumentation-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeir017%2Fdocumentation-generator/lists"}