const $lib: TypeSpecLibrary<{
api-version-not-string: {
default: "Api version must be a string or a string enum";
default: CallableMessage<["version"]>;
client-location-conflict: {
default: "When there is `@client` or `@operationGroup` decorator, `@clientLocation` decorator will be ignored.";
modelPropertyToClientInitialization: CallableMessage<["parameterName"]>;
modelPropertyToString: "`@clientLocation` can only move model properties to interfaces or namespaces.";
operationToOperation: "`@clientLocation` cannot be used to move an operation to another operation. Operations can only be moved to interfaces or namespaces.";
client-location-duplicate: {
default: "`@clientLocation`'s target should not duplicate with defined namespace or interface under `@service` namespace.";
client-location-wrong-type: {
default: "`@clientLocation` could only move operation to the interface or namespace belong to the root namespace with `@service`.";
client-name-ineffective: {
default: CallableMessage<["name"]>;
override: CallableMessage<["name", "originalMethodName"]>;
default: CallableMessage<["name"]>;
conflict-access-override: {
default: "@access override conflicts with the access calculated from operation or other @access override.";
conflicting-multipart-model-usage: {
default: CallableMessage<["modelName", "modelName", "modelName"]>;
discriminator-not-constant: {
default: CallableMessage<["discriminator"]>;
discriminator-not-string: {
default: CallableMessage<["discriminator", "discriminatorValue"]>;
default: CallableMessage<["name", "scope"]>;
nonDecorator: CallableMessage<["name", "scope"]>;
duplicate-client-name-warning: {
default: CallableMessage<["name", "scope"]>;
nonDecorator: CallableMessage<["name", "scope"]>;
default: CallableMessage<["decoratorName"]>;
duplicate-example-file: {
default: CallableMessage<["filename", "title", "operationId"]>;
default: "Cannot pass an empty value to the @clientName decorator";
empty-client-namespace: {
default: "Cannot pass an empty value to the @clientNamespace decorator";
default: CallableMessage<["filename", "error"]>;
noDirectory: CallableMessage<["directory"]>;
noOperationId: CallableMessage<["filename"]>;
example-value-no-mapping: {
default: CallableMessage<["relativePath", "value"]>;
external-library-version-mismatch: {
default: CallableMessage<["libraryName", "versionA", "versionB"]>;
default: "Cannot flatten property of polymorphic type.";
default: "Access value must be \"public\" or \"internal\".";
invalid-alternate-type: {
default: CallableMessage<["kindName"]>;
invalid-client-doc-mode: {
default: CallableMessage<["mode"]>;
invalid-deserializeEmptyStringAsNull-target-type: {
default: "@deserializeEmptyStringAsNull can only be applied to `ModelProperty` of type 'string' or a `Scalar` derived from 'string'.";
invalid-encode-for-collection-format: {
default: "Only encode of `ArrayEncoding.pipeDelimited` and `ArrayEncoding.spaceDelimited` is supported for collection format.";
invalid-initialized-by: {
default: CallableMessage<["message"]>;
invalid-mark-as-lro-target: {
default: CallableMessage<[]>;
default: "Usage value must be one of: 2 (input), 4 (output), 256 (json), or 512 (xml).";
legacy-hierarchy-building-circular-reference: {
default: "@hierarchyBuilding decorator causes recursive base type reference.";
legacy-hierarchy-building-conflict: {
default: CallableMessage<["childModel", "parentModel"]>;
mark-as-lro-ineffective: {
default: CallableMessage<[]>;
default: CallableMessage<["decoratorName"]>;
missing-service-versions: {
default: CallableMessage<["serviceName", "missingVersions"]>;
default: CallableMessage<["originalName", "firstParamAlias"]>;
multiple-response-types: {
default: CallableMessage<["operation"]>;
default: "Multiple services found. Only the first service will be used; others will be ignored.";
no-corresponding-method-param: {
default: CallableMessage<["paramName", "methodName"]>;
no-discriminated-unions: {
default: "Discriminated unions are not supported. Please redefine the type using model with hierarchy and `@discriminator` decorator.";
default: "Can not find name for your emitter, please check your emitter name.";
non-head-bool-response-decorator: {
default: CallableMessage<["operationName"]>;
override-parameters-mismatch: {
default: CallableMessage<["methodName", "checkParameter"]>;
require-versioned-service: {
default: CallableMessage<["serviceName", "decoratorName"]>;
default: CallableMessage<["templateArgumentName", "templateArgumentType"]>;
unexpected-http-param-type: {
default: CallableMessage<["paramName", "expectedType", "actualType"]>;
unexpected-pageable-operation-return-type: {
default: "The response object for the pageable operation is either not a paging model, or is not correctly decorated with @nextLink and @pageItems.";
default: "Cannot have a union containing self.";
default: "Cannot have a union containing only null types.";
unsupported-generic-decorator-arg-type: {
default: CallableMessage<["decoratorName"]>;
default: CallableMessage<["kind"]>;
default: "Currently we only support HTTP and HTTPS protocols";
wrong-client-decorator: {
default: "@client or @operationGroup should decorate namespace or interface in client.tsp";
}, TCGCEmitterOptions, never>;