microsoft / microsoft/typespec
Should `getVersion(program, namespace)` return a VersionMap when called using child namespaces of the versioned namespace?
Open
design:needed
lib:versioning
triaged:core
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
If a specification is created like this:
```tsp
@versioned(Parent.Versions)
namespace Parent {
@service(#{//service metadata...})
namespace Child {
// ... operations
}
namespace Sibling {
//non-operation type definitions or operation templates
}
}
```
Calling getVersion on namespace `Parent.Child` or `Parent.Sibling` it seems that the set of versions specified in the parent namespace *should* be returned.
Since it is a common pattern for http emitters to look for versioning on the namespace with the `@service` decorator, this could cause some issues for specs constructed in this way.
Contributor guide
Assessment
This issue has not been assessed yet.