Skip to content

[V] $lib

const $lib: TypeSpecLibrary<{
content-type-ignored: {
default: "`Content-Type` header ignored because there is no body.";
};
content-type-string: {
default: "contentType parameter must be a string literal or union of string literals";
};
duplicate-body: {
bodyAndUnannotated: "Operation has a @body and an unannotated parameter. There can only be one representing the body";
default: "Operation has multiple @body parameters declared";
duplicateUnannotated: "Operation has multiple unannotated parameters. There can only be one representing the body";
};
duplicate-operation: {
default: CallableMessage<["operationName", "verb", "path"]>;
};
duplicate-route-decorator: {
namespace: "@route was defined twice on this namespace and has different values.";
};
formdata-no-part-name: {
default: "Part used in multipart/form-data must have a name.";
};
header-format-required: {
default: "A format must be specified for @header when type is an array. e.g. @header({format: \"csv\"})";
};
http-file-extra-property: {
default: CallableMessage<["propName"]>;
};
http-verb-duplicate: {
default: CallableMessage<["entityName"]>;
};
incompatible-uri-param: {
default: CallableMessage<["param", "uriKind", "annotationKind"]>;
};
invalid-type-for-auth: {
default: CallableMessage<["kind"]>;
};
metadata-ignored: {
default: CallableMessage<["kind"]>;
};
missing-server-param: {
default: CallableMessage<["param"]>;
};
missing-uri-param: {
default: CallableMessage<["param"]>;
};
multipart-invalid-content-type: {
default: CallableMessage<["contentType", "supportedContentTypes"]>;
};
multipart-model: {
default: "Multipart request body must be a model.";
};
multipart-nested: {
default: "Cannot use @multipartBody inside of an HttpPart";
};
multipart-part: {
default: "Expect item to be an HttpPart model.";
};
multiple-status-codes: {
default: "Multiple `@statusCode` decorators defined for this operation response.";
};
no-service-found: {
default: CallableMessage<["namespace"]>;
};
operation-param-duplicate-type: {
default: CallableMessage<["paramName", "types"]>;
};
optional-path-param: {
default: CallableMessage<["paramName"]>;
};
response-cookie-not-supported: {
default: CallableMessage<["propName"]>;
};
shared-inconsistency: {
default: CallableMessage<["verb", "path"]>;
};
status-code-invalid: {
default: "statusCode value must be a numeric or string literal or union of numeric or string literals";
value: "statusCode value must be a three digit code between 100 and 599";
};
use-uri-template: {
default: CallableMessage<["param"]>;
};
write-visibility-not-supported: {
default: "@visibility(\"write\") is not supported. Use @visibility(\"update\"), @visibility(\"create\") or @visibility(\"create\", \"update\") as appropriate.";
};
}, Record<string, any>,
| "file"
| "statusCode"
| "body"
| "header"
| "path"
| "query"
| "authentication"
| "cookie"
| "bodyRoot"
| "bodyIgnore"
| "multipartBody"
| "verbs"
| "servers"
| "includeInapplicableMetadataInPayload"
| "externalInterfaces"
| "routeProducer"
| "routes"
| "sharedRoutes"
| "routeOptions"
| "httpPart">;