Skip to content

docs(kiota): Add few but important details for CLI call arguments and CPM - #2807

Open
DevTKSS wants to merge 5 commits into
unoplatform:mainfrom
DevTKSS:kiota-fixes
Open

DevTKSS wants to merge 5 commits into
unoplatform:mainfrom
DevTKSS:kiota-fixes

Conversation

@DevTKSS

@DevTKSS DevTKSS commented Jun 12, 2025

Copy link
Copy Markdown
Contributor

… its prompted "missing packages" the user needs to add from this to his CPM file.

  • The Folder "Client" and Namespace should be named with plural as its common for areas of our apps that might get expanded in the development process
  • Executing Kiota CLI tool results with already added HttpKiota Feature and UseHttp() in the host builder to tell about now listed packages needed to be added, so the user will already have the note and copy to clipboard for this now.
  • Added the Project Named Folder to the CLI Path, since not including it, but with the Uno classic folder structure, this resulted on my side in, the Client folder was one directory above the projects we are seeing, so could only be seen from the folder view in VS 2022. Adjusting this like now results in the setup we can explore in Uno apps from template including kiota out of the box.

Important

Please check, the UseHttpKiota to be valid, as its not recognized in my right now to 6.0.110 updated uno app following the guide, to add those details! Secondary, please also update the uno extensions docs version which is pulled in to the Uno.UI repo so the updates like "Http" instead of "HttpKiota" and so on which I did see are here already applyed will be also included on the web docs.

GitHub Issue (If applicable): closes #

found none explicitly to this, but mentioned these details here now added (and hopefully working at runtime as I am trying to get some things set up still) on discord, if that counts as issue.

PR Type

What kind of change does this PR introduce?

  • Documentation content changes

What is the current behavior?

missing parts, CLI Command was not working as expected, on the current published docs the cli command is also --namespace and not with the -name postfix like on the actual md files

What is the new behavior?

the kiota cli command and suddenly missing packages should now get a better expirience as we are prepared and know how to fix that quickly
the dotnet add package seems to not work in uno projects?

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Docs have been added/updated which fit documentation template. (for bug fixes / features)
  • Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Wasm UI Tests are not showing unexpected any differences. Validate PR Screenshots Compare Test Run results.
  • Contains NO breaking changes
  • Updated the Release Notes
  • Associated with an issue (GitHub or internal)

Other information

unoplatform/uno#2792 is still pending as the authentification config with more than 1 client is still a mystery black box from the docs. if the solution is using the ms docs config:subconfig naming, then please "just" add it as information. right now that would not be clear and should include namedoptions capability also for kiota

Internal Issue (If applicable):

@kazo0
kazo0 requested a review from Kunal22shah June 14, 2025 17:00
@kazo0

kazo0 commented Jun 14, 2025

Copy link
Copy Markdown
Contributor

@Kunal22shah can you take a look at this proposed change and see if we need to adjust anything based on the comments? Can we run through the original guide and see if we get any issues, it should work as is

@DevTKSS

DevTKSS commented Jun 14, 2025

Copy link
Copy Markdown
Contributor Author

@kazo0 as I did create the client again using the kiota CLI just now, I just made a recording, so you can from this see, what happens when we are following the docs (the ones which are on web + --namespace-name instead of --namespace used which is already fixed in the non deployed docs.)
explained what I did but as I am having a cough and did not cut it, sorry for the interruptions inbetween 😅
(file was too big for github, so link to it on my onedrive)

https://technischekonstruktion-my.sharepoint.com/:v:/g/personal/info_technische-konstruktion_com/EQti_67g4-lIuFxxeAgGFtEB1lLWfb5zYGwUuqxQ3HJeyw?e=n8M4g6

finally used CLI command on my app Named "DevTKSS.MyManufacturerERP"

kiota generate --openapi Specs/etsy-open-api-spec-3.0.0.json --namespace-name DevTKSS.MyManufacturerERP.Clients.EtsyApi --language CSharp --class-name EtsyApiClient --output ./DevTKSS.MyManufacturerERP/Clients/EtsyApi

following the latest repo docs here this would be:

kiota generate --openapi Specs/etsy-open-api-spec-3.0.0.json --namespace-name DevTKSS.MyManufacturerERP.Clients --language CSharp --class-name EtsyApiClient --output ./Clients  

in respective that my specs folder is not in the ui app folder than directly in the sln folder, but I did not make a chdir ../ or cd ../ command before, so that was executed on the directory every other user would have used, just that he would be needed to add his app name infront of the Specs folder name!

kiota.cli.successfull.cmd.2.mp4

Comment thread doc/Learn/Http/HowTo-Kiota.md Resolved
Comment thread doc/Learn/Http/HowTo-Kiota.md Resolved
Comment thread doc/Learn/Http/HowTo-Kiota.md Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the Kiota CLI documentation by adding crucial missing details about package installation and correcting the CLI command structure. The changes address common issues users face when following the setup guide.

  • Adds section explaining how to install the required Microsoft.Kiota.Bundle package using dotnet CLI
  • Corrects CLI command parameters and folder structure expectations
  • Updates folder naming conventions from "Client" to "Clients" for consistency

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread doc/Learn/Http/HowTo-Kiota.md Resolved
Comment thread doc/Learn/Http/HowTo-Kiota.md Resolved
… its prompted "missing packages" the user needs to add from this to his CPM file.

- The Folder "Client" and Namespace should be named with plural as its common for areas of our apps that might get expanded in the development process
- Executing Kiota CLI tool results with already added HttpKiota Feature and UseHttp() in the host builder (please check, the UseHttpKiota to be valid, as its not recognized in the actual app!) to tell about now listed packages needed to be added, so the user will already have the note and copy to clipboard for this now.
- Added the Project Named Folder to the CLI Path, since not including it, but with the Uno classic folder structure, this resulted on my side in, the Client folder was one directory above the projects we are seeing, so could only be seen from the folder view in VS 2022. Adjusting this like now results in the setup we can explore in Uno apps from template including kiota out of the box.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants