Skip to content

unrecognized-type

Id
@azure-tools/typespec-java/unrecognized-type

Severity: error

This diagnostic is issued when the Java emitter receives an SDK type kind that it cannot map to a Java schema. Specialized messages identify unsupported union or multipart property kinds.

Java client generation stops because the emitter cannot determine a safe Java representation.

This usually indicates an unsupported TypeSpec shape or a version mismatch between the Java emitter and @azure-tools/typespec-client-generator-core. It can also occur when a union or multipart model contains a type kind that the emitter does not support.

Messages include:

Unrecognized type, kind '<kind>'. Updating the version of the emitter may resolve this issue.
Unrecognized type for Union, kind '<kind>'.
Unrecognized type for multipart form data, kind '<kind>'.

Update the Java emitter and TypeSpec dependencies together. If the error identifies a union or multipart property, replace the unsupported member with a supported scalar, model, array, or file type. If the kind should be supported, report an emitter issue with a minimal TypeSpec reproduction.