Skip to content

Data types

TypeSpec.Rest

ResourceLocation

A URL that points to a resource.

scalar TypeSpec.Rest.ResourceLocation

TypeSpec.Rest.Resource

Structure for a paging response using value and nextLink to represent pagination.

This only provides the model structure and not actual pagination support. See https://github.com/microsoft/typespec/issues/705 for general paging support.

model TypeSpec.Rest.Resource.CollectionWithNextLink<Resource>

Template Parameters

NameDescription
ResourceThe resource type of the collection.

Properties

NameTypeDescription
valueArray<Element>
nextLink?TypeSpec.Rest.ResourceLocation

KeysOf

Dynamically gathers keys of the model type Resource.

model TypeSpec.Rest.Resource.KeysOf<Resource>

Template Parameters

NameDescription
ResourceThe target resource model.

Properties

None

ParentKeysOf

Dynamically gathers parent keys of the model type Resource.

model TypeSpec.Rest.Resource.ParentKeysOf<Resource>

Template Parameters

NameDescription
ResourceThe target resource model.

Properties

None

ResourceCollectionParameters

Represents collection operation parameters for the resource of type Resource.

model TypeSpec.Rest.Resource.ResourceCollectionParameters<Resource>

Template Parameters

NameDescription
ResourceThe resource model.

Properties

None

ResourceCreatedResponse

Resource create operation completed successfully.

model TypeSpec.Rest.Resource.ResourceCreatedResponse<Resource>

Template Parameters

NameDescription
ResourceThe resource model that was created.

Properties

NameTypeDescription
statusCode201The status code.
bodyResource

ResourceCreateModel

Resource create operation model.

model TypeSpec.Rest.Resource.ResourceCreateModel<Resource>

Template Parameters

NameDescription
ResourceThe resource model to create.

Properties

None

ResourceCreateOrUpdateModel

Resource create or update operation model.

model TypeSpec.Rest.Resource.ResourceCreateOrUpdateModel<Resource>

Template Parameters

NameDescription
ResourceThe resource model to create or update.

Properties

None

ResourceDeletedResponse

Resource deleted successfully.

model TypeSpec.Rest.Resource.ResourceDeletedResponse

Properties

NameTypeDescription
_200The status code.

ResourceError

The default error response for resource operations.

model TypeSpec.Rest.Resource.ResourceError

Properties

NameTypeDescription
codeint32The error code.
messagestringThe error message.

ResourceParameters

Represents operation parameters for the resource of type Resource.

model TypeSpec.Rest.Resource.ResourceParameters<Resource>

Template Parameters

NameDescription
ResourceThe resource model.

Properties

None