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

Adding @service on sub namespace of versioned namespace that use dependency crash #3263

Closed
timotheeguerin opened this issue May 2, 2024 · 0 comments · Fixed by #3264
Closed

Comments

@timotheeguerin
Copy link
Member

timotheeguerin commented May 2, 2024

import "@typespec/http";
import "@typespec/rest";
import "@typespec/versioning";

using TypeSpec.Versioning;
using TypeSpec.Http;
using TypeSpec.Rest;

@versioned(Versions)
namespace My.Service {
  enum Versions {
    @useDependency(Lib.Versions.v1)
    v1,

    @useDependency(Lib.Versions.v2)
    v2,
  }

  @service
  namespace Sub {
    model Foo is Lib.Bar;
  }
}
@versioned(Versions)
namespace Lib {
  enum Versions {
    v1,
    v2,
  }

  model Bar {}
}

Playground Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant