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

openapi-to-typespec should not depend on a specific version of typespec #5047

Open
markcowl opened this issue Dec 11, 2024 · 3 comments
Open
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. openapi-to-tsp Tracks OpenAPI to Cadl converter issues

Comments

@markcowl
Copy link
Member

Because openapi-to-typespec is used by tsp-client, and tsp-client is a dependecy in the specs repo, pinning the version in depenencies acauses multiple versions of typespec to be installed in the azure-rest-api-specs repo.

Ideally openapi-to-typespec would have a more open set of dependencies, similar to the typespec emitters.

This is somewhat urgent, because it has caused problems in two different TypeSpec releases.

@markcowl markcowl added bug This issue requires a change to an existing behavior in the product in order to be resolved. openapi-to-tsp Tracks OpenAPI to Cadl converter issues labels Dec 11, 2024
@mikeharder mikeharder self-assigned this Dec 11, 2024
@mikeharder mikeharder moved this from 🤔 Triage to 🐝 Dev in Azure SDK EngSys 🚢🎉 Dec 11, 2024
@pshao25
Copy link
Member

pshao25 commented Jan 6, 2025

That's not doable. openapi-to-typespec generates code for that specific version of compiler. One copy of TypeSpec code cannot pass compilation to several versions of compilers.

I suggest we do something at tsp-client side like "only when openapi-to-typespec is called then we install dependencies".

@mikeharder
Copy link
Member

If the versions of openapi-to-typespec and typespec must match exactly, and repo azure-rest-api-specs depends on both, then I only see one solution.

Repo azure-rest-api-specs cannot upgrade either package, until matching versions of both are available. Since we like to upgrade the specs repo as quickly as possible after typespec releases, this means a matching version of openapi-to-typespec should be ready at the same time (or very soon thereafter) as the typespec release.

@pshao25: How can we make this happen?

@pshao25
Copy link
Member

pshao25 commented Jan 7, 2025

Yes, if you could send me the TypeSpec change PR in azure-rest-api-specs several days before TypeSpec release, then I could get openapi-to-typespec prepared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. openapi-to-tsp Tracks OpenAPI to Cadl converter issues
Projects
Development

No branches or pull requests

3 participants