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

kiota-lock.json contains absolute path in descriptionLocation #3151

Closed
jods4 opened this issue Aug 15, 2023 · 8 comments · Fixed by #3582
Closed

kiota-lock.json contains absolute path in descriptionLocation #3151

jods4 opened this issue Aug 15, 2023 · 8 comments · Fixed by #3582
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

@jods4
Copy link

jods4 commented Aug 15, 2023

When using the command line, if code is generated with

dotnet kiota --openapi ./my-api.json

Then the lock file will contain the absolute path to my-api.json.

This is not portable in collaborative environments, where people might check out source code in different locations.

If descriptionLocation is a file, it should be stored as a relative path from the kiota-lock.json, so that dotnet kiota update works for everyone.

@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 Aug 15, 2023
@baywet baywet added this to Kiota Aug 15, 2023
@baywet baywet added this to the Kiota v1.7 milestone Aug 15, 2023
@github-project-automation github-project-automation bot moved this to Todo in Kiota Aug 15, 2023
@baywet baywet self-assigned this Aug 15, 2023
@baywet
Copy link
Member

baywet commented Aug 15, 2023

Thanks for reporting this, is this something you'd be willing to submit a pull request for?

Here is where the lockfile gets written

private static async Task WriteLockFileInternalAsync(string directoryPath, KiotaLock lockInfo, CancellationToken cancellationToken)

@jods4
Copy link
Author

jods4 commented Aug 15, 2023

If you accept PR, yes I can submit one.
Right now I'm about to be on a leave until end of September but if nobody picks this up I might have a look when I come back.

@baywet baywet assigned jods4 and unassigned baywet Aug 15, 2023
@sebastienlevert sebastienlevert modified the milestones: Kiota v1.7, Kiota v1.8 Sep 8, 2023
@baywet
Copy link
Member

baywet commented Oct 24, 2023

@jods4 is this something you're still willing to work on?

@jods4
Copy link
Author

jods4 commented Oct 24, 2023

@baywet Sorry I forgot to come back to you, I've been quite busy since I came back.

There was a turn of events and maybe we'll pivot to Refitter to generate strongly typed api clients in our project.
If we stick to Kiota then yes I will contribute this; on the other hand if we don't use Kiota then I'm afraid I won't have time for this.

To be honest with you: it's not final yet but highly likely that we switch to Refitter.

@baywet
Copy link
Member

baywet commented Oct 24, 2023

no worries, what were (will be) the deciding factors?

@jods4
Copy link
Author

jods4 commented Oct 24, 2023

Refit is a great library to work with apis that do not have OpenAPI specs, which is unfortunately something we must do.

Once we've fully integrated Refit (config, logging, credentials mgmt, httpclient lifetime, etc.) it simply makes sense to use it for OpenAPI too (with Refitter), rather than adopt a second, different http library.

@baywet
Copy link
Member

baywet commented Oct 24, 2023

Thanks for the transparent feedback!

@baywet baywet assigned baywet and unassigned jods4 Oct 24, 2023
@jods4
Copy link
Author

jods4 commented Oct 25, 2023

No problem, thanks for your work on Kiota!

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
Development

Successfully merging a pull request may close this issue.

3 participants