Currently the service metadata decorators must be applied to a namespace, and the namespace must be declared explicitly.

https://github.com/microsoft/cadl/blob/main/docs/tutorial.md#service-definition-and-metadata

For many small services there will be no need for an explicitly defined namespace, so it would be nice to allow the service metadata decorators to apply to "the default namespace" when none is declared explicitly.

0

As suggested in the meeting chat when we have sidecar #841 and global #886 support, you should just be able to do that out of the box.

@@service(global, {title: "This is my service"})
1

Is there any scenario for using @service in a spec without declaring a namespace, outside of sidecars? Is this even possible?

0

#886 is done, and #841 is in PR. Maybe we can close this? Or maybe just track documenting and testing specific pattern?

0
© 2022 pullanswer.com - All rights reserved.