Skip to content

Failure to read OpenAPI file causes lock file to be lost #2292

Closed

Description

> kiota update -o sdk --clean-output
crit: Kiota.Builder.KiotaBuilder[0]
      error updating the client: Could not open the file at C:\sources\github\Moostodon\spec\cadl-output\openapi.json, reason: Could not find a part of the path 'C:\sources\github\Moostodon\spec\cadl-output\openapi.json'.
> kiota update -o sdk --clean-output
No lock file found. Please run the generation command first.

It couldn't find the openapi.json because someone else working on the project checked in their path to the openapi.json. It failed to find it on my machine because of a different path. However, in the process it deleted the entire contents of the sdk folder including the lock file.

  1. Should we try and use a relative path to the OpenAPI file, if possible?
  2. --clean-output shouldn't delete the lock file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

WIPgeneratorIssues or improvements relater to generation capabilities.type:bugA broken experience

Type

No type

Projects

  • Status

    Done ✔️

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions