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

Allow unversioned project to select a specific version of a versioned library #346

Merged

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Mar 21, 2022

fix #323

in library:

@versioned("1" | "2")
namespace VersionedLib {
  model Foo {
    name: string;
    @added("2") age: int32;
  }
}

in project use version 1 of library

@versionedDependency(VersionedLib, "1")
namespace MyService;

model Test extends VersionedLib.Foo {}

Copy link
Contributor

@markcowl markcowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be best to get Brian's feedback about the toTypescript projection before merging, but LGTM.

packages/openapi3/src/openapi.ts Show resolved Hide resolved
packages/versioning/test/test-versioned-dependencies.ts Outdated Show resolved Hide resolved
Copy link
Member

@bterlson bterlson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@timotheeguerin timotheeguerin merged commit cada697 into microsoft:main Mar 25, 2022
@timotheeguerin timotheeguerin deleted the pick-versioned-dependency branch August 15, 2022 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow specifying a versioned dependency from an unversioned spec
3 participants