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