Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The suggested kiota info command given after running generate is incorrect #3342

Closed
StingyJack opened this issue Sep 20, 2023 · 2 comments · Fixed by #3351
Closed

The suggested kiota info command given after running generate is incorrect #3342

StingyJack opened this issue Sep 20, 2023 · 2 comments · Fixed by #3351
Assignees
Labels
generator Issues or improvements relater to generation capabilities. help wanted Issue caused by core project dependency modules or library type:bug A broken experience WIP
Milestone

Comments

@StingyJack
Copy link

When I run a generate and it succeeds, I am given the first hint to get dependencies

PS C:\Temp> kiota  generate --openapi .\OpenAPIFile.json --language csharp --output .\ApiClient.g 
Generation completed successfully

Hint: use the info command to get the list of dependencies you need to add to your project.
Example: kiota info -m C:\Temp\apimanifest.json -l CSharp

So I try to run that command and get

PS C:\Temp> kiota info -m C:\Temp\OpenAPIFile.json -l CSharp
'-m' was not matched. Did you mean one of the following?
-d
-a
-v
-k
-l
Unrecognized command or argument '-m'.
Unrecognized command or argument 'C:\Temp\OpenAPIFile.json'.

But the -m is invalid and should be an -a to make the command work. I think for consistency this should really be either -d or --openapi to match the generate command for the same parameter

@github-project-automation github-project-automation bot moved this to Todo in Kiota Sep 20, 2023
@baywet baywet self-assigned this Sep 21, 2023
@baywet baywet added type:bug A broken experience help wanted Issue caused by core project dependency modules or library generator Issues or improvements relater to generation capabilities. labels Sep 21, 2023
@baywet baywet added this to the Kiota v1.7 milestone Sep 21, 2023
@baywet
Copy link
Member

baywet commented Sep 21, 2023

Hi @StingyJack,
Thanks for using kiota and for reporting this.
There are actually multiple issues here:

  1. The call to the hint method here should first call GetApiManifestDetails and pass a value to the hint method ONLY if it gets a non null value in return, pass it string.Empty otherwise.
  2. the arguments need to be quoted
  3. this argument needs to be quoted too
  4. so does this one

With all those details in mind, would you be willing to submit a pull request to address this issue?

@baywet
Copy link
Member

baywet commented Sep 22, 2023

I just put together #3351 to address the issue.

@github-project-automation github-project-automation bot moved this from Todo to Done in Kiota Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generator Issues or improvements relater to generation capabilities. help wanted Issue caused by core project dependency modules or library type:bug A broken experience WIP
Projects
Archived in project
2 participants