Skip to content

no-rest-library-interfaces

Full name
@azure-tools/typespec-azure-core/no-rest-library-interfaces

Resource interfaces from the TypeSpec.Rest.Resource library are incompatible with Azure.Core. Use the Azure.Core resource operation patterns instead.

Extending from TypeSpec.Rest.Resource.ResourceOperations:

interface Widgets
extends TypeSpec.Rest.Resource.ResourceOperations<Widget, Foundations.ErrorResponse> {}

Define a custom interface using Azure.Core operations:

interface MyResourceOperations<TResource extends TypeSpec.Reflection.Model> {
read is ResourceRead<TResource>;
}
interface Widgets extends MyResourceOperations<Widget> {}