Skip to content

[V] $lib

const $lib: TypeSpecLibrary<object, Record<string, any>,
| "fixed"
| "items"
| "trait"
| "pagedResult"
| "lroStatus"
| "lroSucceeded"
| "lroCanceled"
| "lroFailed"
| "lroResult"
| "lroErrorResult"
| "pollingOperationParameter"
| "pollingLocationInfo"
| "finalLocations"
| "finalLocationResults"
| "finalStateOverride"
| "needsRoute"
| "ensureVerb"
| "embeddingVector"
| "armResourceIdentifierConfig"
| "operationLink"
| "requestParameter"
| "responseParameter"
| "resourceOperation"
| "traitSource"
| "traitContext"
| "traitLocation">;

Type declaration

NameTypeDefault value
bad-record-typeobject-
bad-record-type.extendUnknownCallableMessage<["name", "keyword", "typeName", "keyword"]>-
bad-record-type.recordWithPropertiesCallableMessage<["name", "keyword", "typeName"]>-
client-request-id-trait-missingobject-
client-request-id-trait-missing.defaultCallableMessage<[]>-
conditional-requests-trait-missingobject-
conditional-requests-trait-missing.defaultCallableMessage<[]>-
expected-success-responseobject-
expected-success-response.default"The operation must have a success response"”The operation must have a success response”
expected-trait-diagnostic-missingobject-
expected-trait-diagnostic-missing.default”Expected trait entries must have a “diagnostic” field with a valid diagnostic code for the missing trait.”-
expected-trait-missingobject-
expected-trait-missing.defaultCallableMessage<["trait", "message"]>-
invalid-final-operationobject-
invalid-final-operation.default"The operation linked in the '@finalOperation' decorator must have a 200 response that includes a model."”The operation linked in the ‘@finalOperation’ decorator must have a 200 response that includes a model.”
invalid-final-stateobject-
invalid-final-state.badValueCallableMessage<["finalStateValue"]>-
invalid-final-state.noHeaderCallableMessage<["finalStateValue"]>-
invalid-final-state.notPut"The final state value 'original-uri' can only be used in http PUT operations"”The final state value ‘original-uri’ can only be used in http PUT operations”
invalid-parameterobject-
invalid-parameter.defaultCallableMessage<["propertyName", "kind"]>-
invalid-resource-typeobject-
invalid-resource-type.missingKeyCallableMessage<["name"]>-
invalid-resource-type.missingSegmentCallableMessage<["name"]>-
invalid-trait-contextobject-
invalid-trait-context.default”The trait context can only be an enum member, union of enum members, or `unknown`.""The trait context can only be an enum member, union of enum members, or `unknown`.”
invalid-trait-property-countobject-
invalid-trait-property-count.defaultCallableMessage<["modelName"]>-
invalid-trait-property-typeobject-
invalid-trait-property-type.defaultCallableMessage<["modelName", "propertyName"]>-
lro-polling-data-missing-from-operation-responseobject-
lro-polling-data-missing-from-operation-response.default”At least one operation response must contain a field marked with `@lroStatus`""At least one operation response must contain a field marked with `@lroStatus`“
lro-status-missingobject-
lro-status-missing.defaultCallableMessage<["states"]>-
lro-status-monitor-invalid-result-propertyobject-
lro-status-monitor-invalid-result-property.defaultCallableMessage<["resultType", "decorator"]>-
lro-status-property-invalid-typeobject-
lro-status-property-invalid-type.default"Property type must be a union of strings or an enum."”Property type must be a union of strings or an enum.”
lro-status-union-non-stringobject-
lro-status-union-non-string.defaultCallableMessage<["type"]>-
no-objectobject-
no-object.default”Don’t use ‘object’.\n - If you want an object with any properties, use `Record<unknown>`\n - If you meant anything, use `unknown`.""Don’t use ‘object’.\n - If you want an object with any properties, use `Record<unknown>`\n - If you meant anything, use `unknown`.”
operation-link-parameter-invalidobject-
operation-link-parameter-invalid.default"Parameters must be of template type RequestParameter<T> or ResponseProperty<T>."”Parameters must be of template type RequestParameter<T> or ResponseProperty<T>.”
operation-link-parameter-invalid-targetobject-
operation-link-parameter-invalid-target.defaultCallableMessage<["name"]>-
polling-operation-no-lro-failureobject-
polling-operation-no-lro-failure.default"The status monitor returned from the polling operation must have a status property, with a known status value the indicates failure. This known value may be named 'Failed' or marked with the '@lroFailed' decorator."”The status monitor returned from the polling operation must have a status property, with a known status value the indicates failure. This known value may be named ‘Failed’ or marked with the ‘@lroFailed’ decorator.”
polling-operation-no-lro-successobject-
polling-operation-no-lro-success.default"The status monitor returned from the polling operation must have a status property, with a known status value the indicates successful completion. This known value may be named 'Succeeded' or marked with the '@lroSucceeded' decorator."”The status monitor returned from the polling operation must have a status property, with a known status value the indicates successful completion. This known value may be named ‘Succeeded’ or marked with the ‘@lroSucceeded’ decorator.”
polling-operation-no-ref-or-linkobject-
polling-operation-no-ref-or-link.default"An operation decorated with '@pollingOperation' must either return a response with an 'Operation-Location' header that will contain a runtime link to the polling operation, or specify parameters and return type properties to map into the polling operation parameters. A map into polling operation parameters can be created using the '@pollingOperationParameter' decorator"”An operation decorated with ‘@pollingOperation’ must either return a response with an ‘Operation-Location’ header that will contain a runtime link to the polling operation, or specify parameters and return type properties to map into the polling operation parameters. A map into polling operation parameters can be created using the ‘@pollingOperationParameter’ decorator”
polling-operation-no-status-monitorobject-
polling-operation-no-status-monitor.default"The operation linked in @pollingOperation must return a valid status monitor. The status monitor model must contain a 'status' property, or a property decorated with '@lroStatus'. The status field must be of Enum or Union type and contain terminal status values for success and failure."”The operation linked in @pollingOperation must return a valid status monitor. The status monitor model must contain a ‘status’ property, or a property decorated with ‘@lroStatus’. The status field must be of Enum or Union type and contain terminal status values for success and failure.”
polling-operation-return-modelobject-
polling-operation-return-model.default"An operation annotated with @pollingOperation must return a model or union of model."”An operation annotated with @pollingOperation must return a model or union of model.”
repeatable-requests-trait-missingobject-
repeatable-requests-trait-missing.defaultCallableMessage<[]>-
request-parameter-invalidobject-
request-parameter-invalid.defaultCallableMessage<["name"]>-
response-property-invalidobject-
response-property-invalid.defaultCallableMessage<["name"]>-
rpc-operation-needs-routeobject-
rpc-operation-needs-route.default"The operation needs a @route"”The operation needs a @route”
trait-property-without-locationobject-
trait-property-without-location.defaultCallableMessage<["modelName", "propertyName"]>-
union-enums-circularobject-
union-enums-circular.default"Union is referencing itself and cannot be resolved as an enum."-
union-enums-invalid-kindobject-
union-enums-invalid-kind.defaultCallableMessage<["kind"]>-
union-enums-multiple-kindobject-
union-enums-multiple-kind.defaultCallableMessage<["kinds"]>-
verb-conflictobject-
verb-conflict.defaultCallableMessage<["templateName", "requiredVerb", "verb"]>-