You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After emitter use TCGC createSdkContext, the returned SdkContext value contains all the diagnostics found when generating SDK interfaces in TCGC: diagnostics: readonly Diagnostic[];, language's emitter should report them when they use TCGC using the code: program.reportDiagnostics(sdkContext.diagnostics);
Current diagnostics in TCGC listed as follows:
"example-loading": {severity: "warning",messages: {default: paramMessage`Skipped loading invalid example file: ${"filename"}. Error: ${"error"}`,noDirectory: paramMessage`Skipping example loading from ${"directory"} because there was an error reading the directory.`,noOperationId: paramMessage`Skipping example file ${"filename"} because it does not contain an operationId and/or title.`,},},"duplicate-example-file": {severity: "error",messages: {default: paramMessage`Example file ${"filename"} uses duplicate title '${"title"}' for operationId '${"operationId"}'`,},},"example-value-no-mapping": {severity: "warning",messages: {default: paramMessage`Value in example file '${"relativePath"}' does not follow its definition:\n${"value"}`,},},"unexpected-http-param-type": {severity: "error",messages: {default: paramMessage`Expected parameter "${"paramName"}" to be of type "${"expectedType"}", but instead it is of type "${"actualType"}"`,},},"multiple-response-types": {severity: "warning",messages: {default: paramMessage`Multiple response types found in operation ${"operation"}. Only one response type is supported, so we will choose the first one ${"response"}`,},},"no-corresponding-method-param": {severity: "error",messages: {default: paramMessage`Missing "${"paramName"}" method parameter in method "${"methodName"}", when "${"paramName"}" must be sent to the service. Add a parameter named "${"paramName"}" to the method.`,},},"no-emitter-name": {severity: "warning",messages: {default: "Can not find name for your emitter, please check your emitter name.",},},"unsupported-generic-decorator-arg-type": {severity: "warning",messages: {default: paramMessage`Can not parse the arg type for decorator "${"decoratorName"}".`,},},"unsupported-protocol": {severity: "error",messages: {default: "Currently we only support HTTP and HTTPS protocols",},},"server-param-not-path": {severity: "error",messages: {default: paramMessage`Template argument ${"templateArgumentName"} is not a path parameter, it is a ${"templateArgumentType"}. It has to be a path.`,},},"multiple-services": {severity: "warning",messages: {default: paramMessage`Multiple services found in definition. Only one service is supported, so we will choose the first one ${"service"}`,},},"union-null": {severity: "error",messages: {default: "Cannot have a union containing only null types.",},},"discriminator-not-constant": {severity: "error",messages: {default: paramMessage`Discriminator ${"discriminator"} has to be constant`,},},"discriminator-not-string": {severity: "warning",messages: {default: paramMessage`Value of discriminator ${"discriminator"} has to be a string, not ${"discriminatorValue"}`,},},"unsupported-kind": {severity: "warning",messages: {default: paramMessage`Unsupported kind ${"kind"}`,},},"encoding-multipart-bytes": {severity: "error",messages: {default:
"Encoding should not be applied to bytes content in a multipart request. This is semi-incompatible with how multipart works in HTTP.",},},"conflict-usage-override": {severity: "warning",messages: {default: `@usage override conflicts with the usage calculated from operation or other @usage override.`,},},"conflict-access-override": {severity: "warning",messages: {default: `@access override conflicts with the access calculated from operation or other @access override.`,},},"conflicting-multipart-model-usage": {severity: "error",messages: {default: "Invalid encoding",wrongType: paramMessage`Model '${"modelName"}' cannot be used as both multipart/form-data input and regular body input. You can create a separate model with name 'model ${"modelName"}FormData' extends ${"modelName"} {}`,},}
The text was updated successfully, but these errors were encountered:
After emitter use TCGC
createSdkContext
, the returnedSdkContext
value contains all the diagnostics found when generating SDK interfaces in TCGC:diagnostics: readonly Diagnostic[];
, language's emitter should report them when they use TCGC using the code:program.reportDiagnostics(sdkContext.diagnostics);
Current diagnostics in TCGC listed as follows:
The text was updated successfully, but these errors were encountered: