Skip to content

[V] $lib

const $lib: TypeSpecLibrary<object, Record<string, any>,
| "file"
| "statusCode"
| "body"
| "header"
| "path"
| "query"
| "authentication"
| "cookie"
| "bodyRoot"
| "bodyIgnore"
| "multipartBody"
| "verbs"
| "servers"
| "includeInapplicableMetadataInPayload"
| "externalInterfaces"
| "routeProducer"
| "routes"
| "sharedRoutes"
| "routeOptions"
| "httpPart">;

Type declaration

NameTypeDefault value
content-type-ignoredobject-
content-type-ignored.default”`Content-Type` header ignored because there is no body.""`Content-Type` header ignored because there is no body.”
content-type-stringobject-
content-type-string.default"contentType parameter must be a string literal or union of string literals"”contentType parameter must be a string literal or union of string literals”
duplicate-bodyobject-
duplicate-body.bodyAndUnannotated"Operation has a @body and an unannotated parameter. There can only be one representing the body"”Operation has a @body and an unannotated parameter. There can only be one representing the body”
duplicate-body.default"Operation has multiple @body parameters declared"”Operation has multiple @body parameters declared”
duplicate-body.duplicateUnannotated"Operation has multiple unannotated parameters. There can only be one representing the body"”Operation has multiple unannotated parameters. There can only be one representing the body”
duplicate-operationobject-
duplicate-operation.defaultCallableMessage<["operationName", "verb", "path"]>-
duplicate-route-decoratorobject-
duplicate-route-decorator.namespace"@route was defined twice on this namespace and has different values."”@route was defined twice on this namespace and has different values.”
formdata-no-part-nameobject-
formdata-no-part-name.default"Part used in multipart/form-data must have a name."”Part used in multipart/form-data must have a name.”
header-format-requiredobject-
header-format-required.default”A format must be specified for @header when type is an array. e.g. @header({format: “csv”})“-
http-file-extra-propertyobject-
http-file-extra-property.defaultCallableMessage<["propName"]>-
http-verb-duplicateobject-
http-verb-duplicate.defaultCallableMessage<["entityName"]>-
incompatible-uri-paramobject-
incompatible-uri-param.defaultCallableMessage<["param", "uriKind", "annotationKind"]>-
invalid-type-for-authobject-
invalid-type-for-auth.defaultCallableMessage<["kind"]>-
metadata-ignoredobject-
metadata-ignored.defaultCallableMessage<["kind"]>-
missing-server-paramobject-
missing-server-param.defaultCallableMessage<["param"]>-
missing-uri-paramobject-
missing-uri-param.defaultCallableMessage<["param"]>-
multipart-invalid-content-typeobject-
multipart-invalid-content-type.defaultCallableMessage<["contentType", "supportedContentTypes"]>-
multipart-modelobject-
multipart-model.default"Multipart request body must be a model."”Multipart request body must be a model.”
multipart-nestedobject-
multipart-nested.default"Cannot use @multipartBody inside of an HttpPart"”Cannot use @multipartBody inside of an HttpPart”
multipart-partobject-
multipart-part.default"Expect item to be an HttpPart model."”Expect item to be an HttpPart model.”
multiple-status-codesobject-
multiple-status-codes.default”Multiple `@statusCode` decorators defined for this operation response.""Multiple `@statusCode` decorators defined for this operation response.”
no-service-foundobject-
no-service-found.defaultCallableMessage<["namespace"]>-
operation-param-duplicate-typeobject-
operation-param-duplicate-type.defaultCallableMessage<["paramName", "types"]>-
optional-path-paramobject-
optional-path-param.defaultCallableMessage<["paramName"]>-
response-cookie-not-supportedobject-
response-cookie-not-supported.defaultCallableMessage<["propName"]>-
shared-inconsistencyobject-
shared-inconsistency.defaultCallableMessage<["verb", "path"]>-
status-code-invalidobject-
status-code-invalid.default"statusCode value must be a numeric or string literal or union of numeric or string literals"”statusCode value must be a numeric or string literal or union of numeric or string literals”
status-code-invalid.value"statusCode value must be a three digit code between 100 and 599"”statusCode value must be a three digit code between 100 and 599”
use-uri-templateobject-
use-uri-template.defaultCallableMessage<["param"]>-
write-visibility-not-supportedobject-
write-visibility-not-supported.default”@visibility(“write”) is not supported. Use @visibility(“update”), @visibility(“create”) or @visibility(“create”, “update”) as appropriate.”-