{"id":16111060,"url":"https://github.com/nikiforovall/kiota-getting-started","last_synced_at":"2025-04-13T20:41:38.481Z","repository":{"id":229065619,"uuid":"775644523","full_name":"NikiforovAll/kiota-getting-started","owner":"NikiforovAll","description":"Kiota + Aspire + .NET 8","archived":false,"fork":false,"pushed_at":"2024-03-24T13:49:47.000Z","size":121,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T11:02:39.356Z","etag":null,"topics":["aspire","aspnet-core","aspnetcore","dotnet","dotnet8","kiota"],"latest_commit_sha":null,"homepage":"https://nikiforovall.github.io/dotnet/aspnetcore/2024/03/24/kiota-guide-deep-dive.html","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/NikiforovAll.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2024-03-21T19:16:22.000Z","updated_at":"2025-01-21T15:22:20.000Z","dependencies_parsed_at":"2024-10-31T22:41:12.991Z","dependency_job_id":"ea593698-4519-4c34-96ac-02518fbfe551","html_url":"https://github.com/NikiforovAll/kiota-getting-started","commit_stats":null,"previous_names":["nikiforovall/kiota-getting-started"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fkiota-getting-started","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fkiota-getting-started/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fkiota-getting-started/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fkiota-getting-started/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NikiforovAll","download_url":"https://codeload.github.com/NikiforovAll/kiota-getting-started/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782261,"owners_count":21160716,"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":["aspire","aspnet-core","aspnetcore","dotnet","dotnet8","kiota"],"created_at":"2024-10-09T19:40:15.893Z","updated_at":"2025-04-13T20:41:38.456Z","avatar_url":"https://github.com/NikiforovAll.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kiota + Aspire [![.NET](https://github.com/NikiforovAll/kiota-getting-started/actions/workflows/dotnet.yml/badge.svg)](https://github.com/NikiforovAll/kiota-getting-started/actions/workflows/dotnet.yml)\n\nThis demo showcases the integration of Kiota, Aspire, and .NET 8! This project demonstrates how these technologies can work together seamlessly.\n\n## Overview\n\nIn this demo, we have an application (`App.Client`) that calls our application's API (`App API`). This application integrates with the Bing REST API. The unique aspect of this project is that every HTTP client is automatically generated based on OpenAPI and Kiota.\n\n### Technologies\n\n- Aspire - \u003chttps://learn.microsoft.com/en-us/dotnet/aspire/get-started/aspire-overview\u003e\n- Kiota - \u003chttps://learn.microsoft.com/en-us/openapi/kiota\u003e\n\n\n## Key Features\n\n- **App.Client**: This is our main application that interacts with the `App API`.\n- **App**: This is our application's API which serves as the bridge between `App.Client` and the Bing REST API.\n- **Bing REST API Integration**: Our application integrates with the Bing REST API to fetch data.\n- **Automatic HTTP Client Generation**: We leverage OpenAPI and Kiota to automate the generation of every HTTP client in our application.\n\n## Components\n\n| Component | Description |\n| --- | --- |\n| `App` | Integrates with Bing REST API |\n| `NewsSearch.Sdk` | Generated OpenAPI HTTP Client by Kiota. It's based on externally provided OpenAPI specification |\n| `App.Sdk` | Generated OpenAPI HTTP Client by Kiota |\n| `App.Client` | Invokes `App` via App.Sdk |\n| `App.Client.Sdk` | Generated OpenAPI HTTP Client by Kiota |\n| `App.Client.Cli` | Generated CLI Client by Kiota. Convention-based commands based on App.Client OpenAPI specification|\n| `App.AppHost` | Aspire Host |\n| `App.ServiceDefaults` | Reasonable service defaults provided in 'Aspire' paradigm. |\n\n```mermaid\ngraph LR\n    App --\u003e NewsSearchSdk[\"NewsSearch.Sdk\"]\n    App --\u003e AppServiceDefaults[\"App.ServiceDefaults\"]\n    AppClient --\u003e AppSdk[\"App.Sdk\"]\n    AppClient[\"App.Client\"] --\u003e AppServiceDefaults\n    AppAppHost[\"App.AppHost\"] --\u003e App\n    AppAppHost --\u003e AppClient\n```\n\n## Getting Started\n\nConfigure `App` and run Aspire AppHost.\n\n```bash\ndotnet user-secrets --project ./src/App set ApiKey \"\u003ckey\u003e\"\ndotnet run --project ./src/App.AppHost\n```\n\nSee what `App.Client.CLI` can do.\n\n```bash\n$ dotnet run --project ./src/App.Client.Cli/ -- my trending get -h\n# Description:\n\n# Usage:\n#   App.Client.Cli my trending get [options]\n\n# Options:\n#   --output \u003cJSON|NONE|RAW_JSON|TABLE|TEXT\u003e  [default: JSON]\n#   --query \u003cquery\u003e\n#   -?, -h, --help                            Show help and usage information\n```\n\nRun:\n\n```bash\n$ dotnet run --project ./src/App.Client.Cli/ -- my trending get --output TABLE\n# ┌───────────────────────────────────────────────────────────────────────────────────┐\n# │ Value                                                                             │\n# ├───────────────────────────────────────────────────────────────────────────────────┤\n# │ US sues Apple                                                                     │\n# │ Sabalenka on Koltsov's death                                                      │\n# │ US submits UN draft resolution                                                    │\n# │ Biden cancels $6 billion student debt                                             │\n# │ Barron Trump's comment                                                            │\n# │ Starbucks mugs recalled                                                           │\n# │ Milwaukee election official convicted                                             │\n# │ February home sales                                                               │\n# │ Demi Moore shares tribute to Bruce Willis                                         │\n# │ Congress unveils $1.2 trillion funding bill                                       │\n# │ Bacteria found in colon cancer                                                    │\n# │ Erv Woolsey dies                                                                  │\n# │ Georgia executes man for 1993 murder                                              │\n# │ Lukas Gage addresses rumors                                                       │\n# │ UN resolution on AI                                                               │\n# │ Dana Carvey apologizes to Sharon Stone                                            │\n# │ `House of the Dragon' trailers                                                    │\n# │ Summerfest 2024 lineup                                                            │\n# │ Pig's kidney transplanted into a man                                              │\n# │ Hayley Erbert, Derek Hough return                                                 │\n# │ Airline CEOs seek meeting with Boeing directors                                   │\n# │ Russia fires missiles at Kyiv                                                     │\n# │ Airlines passengers' personal information review                                  │\n# │ Micron stock jumps                                                                │\n# │ Rocket Lab launches NRO spy satellites                                            │\n# │ Idaho prisoner manhunt day 2                                                      │\n# │ US weekly jobless claims                                                          │\n# │ Hermès targeted in lawsuit                                                        │\n# │ Powerball winning numbers                                                         │\n# │ California voters pass Proposition 1                                              │\n# │ Beyoncé to receive Innovator Award                                                │\n# │ Maren Morris tour dates                                                           │\n# │ Meta, Microsoft, X and Match join Epic Games                                      │\n# │ Target doubling employee bonuses                                                  │\n# │ Kevin Durant NBA career scoring list                                              │\n# └───────────────────────────────────────────────────────────────────────────────────┘\n```\n\nSee the trace:\n\n![trace-example](./assets/trace-example.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikiforovall%2Fkiota-getting-started","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikiforovall%2Fkiota-getting-started","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikiforovall%2Fkiota-getting-started/lists"}