Data types
TypeSpec.Rest
Section titled “TypeSpec.Rest”ResourceLocation
Section titled “ResourceLocation”A URL that points to a resource.
scalar TypeSpec.Rest.ResourceLocationTypeSpec.Rest.Resource
Section titled “TypeSpec.Rest.Resource”CollectionWithNextLink
Section titled “CollectionWithNextLink”Structure for a paging response using value and nextLink to represent pagination.
model TypeSpec.Rest.Resource.CollectionWithNextLink<Resource>Template Parameters
Section titled “Template Parameters”| Name | Description |
|---|---|
| Resource | The resource type of the collection. |
Properties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
| value | Array<Element> | |
| nextLink? | TypeSpec.Rest.ResourceLocation |
KeysOf
Section titled “KeysOf”Dynamically gathers keys of the model type Resource.
model TypeSpec.Rest.Resource.KeysOf<Resource>Template Parameters
Section titled “Template Parameters”| Name | Description |
|---|---|
| Resource | The target resource model. |
Properties
Section titled “Properties”None
ParentKeysOf
Section titled “ParentKeysOf”Dynamically gathers parent keys of the model type Resource.
model TypeSpec.Rest.Resource.ParentKeysOf<Resource>Template Parameters
Section titled “Template Parameters”| Name | Description |
|---|---|
| Resource | The target resource model. |
Properties
Section titled “Properties”None
ResourceCollectionParameters
Section titled “ResourceCollectionParameters”Represents collection operation parameters for the resource of type Resource.
model TypeSpec.Rest.Resource.ResourceCollectionParameters<Resource>Template Parameters
Section titled “Template Parameters”| Name | Description |
|---|---|
| Resource | The resource model. |
Properties
Section titled “Properties”None
ResourceCreatedResponse
Section titled “ResourceCreatedResponse”Resource create operation completed successfully.
model TypeSpec.Rest.Resource.ResourceCreatedResponse<Resource>Template Parameters
Section titled “Template Parameters”| Name | Description |
|---|---|
| Resource | The resource model that was created. |
Properties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
| statusCode | 201 | The status code. |
| body | Resource |
ResourceCreateModel
Section titled “ResourceCreateModel”Resource create operation model.
model TypeSpec.Rest.Resource.ResourceCreateModel<Resource>Template Parameters
Section titled “Template Parameters”| Name | Description |
|---|---|
| Resource | The resource model to create. |
Properties
Section titled “Properties”None
ResourceCreateOrUpdateModel
Section titled “ResourceCreateOrUpdateModel”Resource create or update operation model.
model TypeSpec.Rest.Resource.ResourceCreateOrUpdateModel<Resource>Template Parameters
Section titled “Template Parameters”| Name | Description |
|---|---|
| Resource | The resource model to create or update. |
Properties
Section titled “Properties”None
ResourceDeletedResponse
Section titled “ResourceDeletedResponse”Resource deleted successfully.
model TypeSpec.Rest.Resource.ResourceDeletedResponseProperties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
| _ | 200 | The status code. |
ResourceError
Section titled “ResourceError”The default error response for resource operations.
model TypeSpec.Rest.Resource.ResourceErrorProperties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
| code | int32 | The error code. |
| message | string | The error message. |
ResourceParameters
Section titled “ResourceParameters”Represents operation parameters for the resource of type Resource.
model TypeSpec.Rest.Resource.ResourceParameters<Resource>Template Parameters
Section titled “Template Parameters”| Name | Description |
|---|---|
| Resource | The resource model. |
Properties
Section titled “Properties”None