MicrosoftDocs / openapi-docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add documentation on how to configure ASP.NET dependency injection for kiota client

baywet opened this issue · comments

@baywet I've just build a complete example on how to use Kiota with Dependency Injection. https://github.com/svrooij/KiotaWithDependencyInjection

Thanks for putting this together! Do you think you'd be up to create a new tutorial (ASP.NET), under a new "Use kiota clients with dependency injection" category, a little like this one?
https://learn.microsoft.com/en-us/openapi/kiota/tutorials/dotnet-azure?tabs=portal

@baywet Yes I do, but I would need some pointers on where to put it and how it works with code samples. Can you help me out with that?

Sure!
The source for the tutorial I used as an example is here
You could start off by creating a copy and naming it "aspnet-dependencyinjection.md"

Then we'll also need a matching entry here

Do you have additional questions?
@jasonjoh to correct me if my guidance was off.

@baywet I was trying to start with it and found the the uses pointers to external code samples. Where are they located and is it also allowed to just include the code for the samples in a markdown code block?

:::code language="yaml" source="~/code-snippets/get-started/azure-auth/get-me.yml":::

This is driven by this configuration and ultimately points to this file

I'd say we'd have a preference aligning with this approach this way:

  • people can grab the project
  • we can setup dependabot to update the dependencies
  • we can setup CI to check things still build as we update the dependencies

what do you think?