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

Error on converting Swagger API to TypeSpec #4906

Closed
2 tasks done
satravi opened this issue Mar 11, 2024 · 2 comments
Closed
2 tasks done

Error on converting Swagger API to TypeSpec #4906

satravi opened this issue Mar 11, 2024 · 2 comments
Labels
question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@satravi
Copy link

satravi commented Mar 11, 2024

Before asking the question:

  • have you checked the faq, the documentation in the docs folder and couldn't find the information there
  • have you checked existing issues for a similar question?

The conversion script from https://azure.github.io/typespec-azure/docs/category/convert-swagger-to-typespec has 2 stages.
GenerateMetadata => Completed successfully and the .cs files got generated.
DoConvert => Throws below error

Error: ENOENT: no such file or directory, open 'C:\Users\<user>\.autorest\@autorestopenapi-to-typespec@0.7.0-dev.12\nodemodules\@autorest\openapi-to-typespec\typeSpec\resources.json'

Below is the command that we executed for DoConvert

autorest --version=3.10.1 --openapi-to-typespec --isArm --use="@autorest/openapi-to-typespec@0.7.0-dev.12" --output-folder="typeSpec" .\readme.md

@satravi satravi added the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Mar 11, 2024
@timotheeguerin
Copy link
Member

I believe this was resolved offline, feel free to comment with the solution or reopen if not.

@satravi
Copy link
Author

satravi commented Mar 13, 2024

Have successfully converted the APIs to TypeSpec format.
Our readme.md directory path had a space in the directory name. After removing the space from the directory name, it worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

2 participants