Skip to content

dpg-protocol-api-not-generated

Id
@azure-tools/typespec-java/dpg-protocol-api-not-generated

Severity: warning

This diagnostic is issued when an Azure-flavored multipart operation would produce a protocol API that is not usable with the generated request shape.

The convenience API is generated, but the protocol API is omitted for the operation.

model UploadForm {
file: HttpPart<bytes>;
}
@post
op upload(@header contentType: "multipart/form-data", @multipartBody body: UploadForm): void;
Operation 'upload' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not generated.

No change is required. Use the generated convenience API for the multipart operation.

It is safe to ignore or suppress this notification when the generated convenience API is sufficient.