Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: dependencies
packages:
- "@typespec/http-client-java"
---

Update Node.js dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ export class CodeModelBuilder {
let generateProtocolApi: boolean = sdkMethod.generateProtocol;

let diagnostic = undefined;
if (generateConvenienceApi) {
if (generateConvenienceApi && this.isAzureV1()) {
// check if the convenience API need to be disabled for some special cases
if (operationIsMultipart(httpOperation)) {
// do not generate protocol method for multipart/form-data, as it be very hard for user to prepare the request body as BinaryData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@
"spector-stop": "tsp-spector server stop"
},
"dependencies": {
"@typespec/spector": "0.1.0-alpha.24",
"@typespec/spec-api": "0.1.0-alpha.13",
"@typespec/http-specs": "0.1.0-alpha.35",
"@typespec/json-schema": "1.10.0",
"@typespec/spector": "0.1.0-alpha.25",
"@typespec/spec-api": "0.1.0-alpha.14",
"@typespec/http-specs": "0.1.0-alpha.36",
"@typespec/json-schema": "1.11.0",
"@typespec/http-client-java": "file:../../typespec-http-client-java-0.7.0.tgz",
"@typespec/http-client-java-tests": "file:"
},
"overrides": {
"@typespec/compiler": "1.10.0",
"@typespec/http": "1.10.0",
"@typespec/rest": "0.80.0",
"@typespec/versioning": "0.80.0",
"@typespec/openapi": "1.10.0",
"@typespec/xml": "0.80.0",
"@typespec/events": "0.80.0",
"@typespec/sse": "0.80.0",
"@typespec/streams": "0.80.0",
"@azure-tools/typespec-azure-core": "0.66.1",
"@azure-tools/typespec-client-generator-core": "0.66.4",
"@azure-tools/typespec-azure-resource-manager": "0.66.1",
"@azure-tools/typespec-autorest": "0.66.2"
"@typespec/compiler": "1.11.0",
"@typespec/http": "1.11.0",
"@typespec/rest": "0.81.0",
"@typespec/versioning": "0.81.0",
"@typespec/openapi": "1.11.0",
"@typespec/xml": "0.81.0",
"@typespec/events": "0.81.0",
"@typespec/sse": "0.81.0",
"@typespec/streams": "0.81.0",
"@azure-tools/typespec-azure-core": "0.67.0",
"@azure-tools/typespec-client-generator-core": "0.67.0",
"@azure-tools/typespec-azure-resource-manager": "0.67.0",
"@azure-tools/typespec-autorest": "0.67.0"
},
"private": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public final class FormDataClient {
@Metadata(properties = { MetadataProperties.GENERATED })
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> basicWithResponse(MultiPartRequest body, RequestContext requestContext) {
// Operation 'basic' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not
// generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.basic", requestContext,
updatedContext -> this.serviceClient.basicWithResponse(body, updatedContext));
}
Expand Down Expand Up @@ -80,8 +78,6 @@ public void basic(MultiPartRequest body) {
@Metadata(properties = { MetadataProperties.GENERATED })
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> withWireNameWithResponse(MultiPartRequestWithWireName body, RequestContext requestContext) {
// Operation 'withWireName' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not
// generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.withWireName", requestContext,
updatedContext -> this.serviceClient.withWireNameWithResponse(body, updatedContext));
}
Expand Down Expand Up @@ -113,8 +109,6 @@ public void withWireName(MultiPartRequestWithWireName body) {
@Metadata(properties = { MetadataProperties.GENERATED })
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> optionalPartsWithResponse(MultiPartOptionalRequest body, RequestContext requestContext) {
// Operation 'optionalParts' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not
// generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.optionalParts", requestContext,
updatedContext -> this.serviceClient.optionalPartsWithResponse(body, updatedContext));
}
Expand Down Expand Up @@ -146,8 +140,6 @@ public void optionalParts(MultiPartOptionalRequest body) {
@Metadata(properties = { MetadataProperties.GENERATED })
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> fileArrayAndBasicWithResponse(ComplexPartsRequest body, RequestContext requestContext) {
// Operation 'fileArrayAndBasic' is of content-type 'multipart/form-data'. Protocol API is not usable and hence
// not generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.fileArrayAndBasic",
requestContext, updatedContext -> this.serviceClient.fileArrayAndBasicWithResponse(body, updatedContext));
}
Expand Down Expand Up @@ -179,8 +171,6 @@ public void fileArrayAndBasic(ComplexPartsRequest body) {
@Metadata(properties = { MetadataProperties.GENERATED })
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> jsonPartWithResponse(JsonPartRequest body, RequestContext requestContext) {
// Operation 'jsonPart' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not
// generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.jsonPart", requestContext,
updatedContext -> this.serviceClient.jsonPartWithResponse(body, updatedContext));
}
Expand Down Expand Up @@ -212,8 +202,6 @@ public void jsonPart(JsonPartRequest body) {
@Metadata(properties = { MetadataProperties.GENERATED })
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> binaryArrayPartsWithResponse(BinaryArrayPartsRequest body, RequestContext requestContext) {
// Operation 'binaryArrayParts' is of content-type 'multipart/form-data'. Protocol API is not usable and hence
// not generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.binaryArrayParts",
requestContext, updatedContext -> this.serviceClient.binaryArrayPartsWithResponse(body, updatedContext));
}
Expand Down Expand Up @@ -245,8 +233,6 @@ public void binaryArrayParts(BinaryArrayPartsRequest body) {
@Metadata(properties = { MetadataProperties.GENERATED })
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> multiBinaryPartsWithResponse(MultiBinaryPartsRequest body, RequestContext requestContext) {
// Operation 'multiBinaryParts' is of content-type 'multipart/form-data'. Protocol API is not usable and hence
// not generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.multiBinaryParts",
requestContext, updatedContext -> this.serviceClient.multiBinaryPartsWithResponse(body, updatedContext));
}
Expand Down Expand Up @@ -279,8 +265,6 @@ public void multiBinaryParts(MultiBinaryPartsRequest body) {
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> checkFileNameAndContentTypeWithResponse(MultiPartRequest body,
RequestContext requestContext) {
// Operation 'checkFileNameAndContentType' is of content-type 'multipart/form-data'. Protocol API is not usable
// and hence not generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.checkFileNameAndContentType",
requestContext,
updatedContext -> this.serviceClient.checkFileNameAndContentTypeWithResponse(body, updatedContext));
Expand Down Expand Up @@ -313,8 +297,6 @@ public void checkFileNameAndContentType(MultiPartRequest body) {
@Metadata(properties = { MetadataProperties.GENERATED })
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> anonymousModelWithResponse(AnonymousModelRequest body, RequestContext requestContext) {
// Operation 'anonymousModel' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not
// generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.anonymousModel", requestContext,
updatedContext -> this.serviceClient.anonymousModelWithResponse(body, updatedContext));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ public final class FormDataFileClient {
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> uploadFileSpecificContentTypeWithResponse(UploadFileSpecificContentTypeRequest body,
RequestContext requestContext) {
// Operation 'uploadFileSpecificContentType' is of content-type 'multipart/form-data'. Protocol API is not
// usable and hence not generated.
return this.instrumentation.instrumentWithResponse(
"Payload.MultiPart.FormData.File.uploadFileSpecificContentType", requestContext,
updatedContext -> this.serviceClient.uploadFileSpecificContentTypeWithResponse(body, updatedContext));
Expand Down Expand Up @@ -85,8 +83,6 @@ public void uploadFileSpecificContentType(UploadFileSpecificContentTypeRequest b
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> uploadFileRequiredFilenameWithResponse(UploadFileRequiredFilenameRequest body,
RequestContext requestContext) {
// Operation 'uploadFileRequiredFilename' is of content-type 'multipart/form-data'. Protocol API is not usable
// and hence not generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.File.uploadFileRequiredFilename",
requestContext,
updatedContext -> this.serviceClient.uploadFileRequiredFilenameWithResponse(body, updatedContext));
Expand Down Expand Up @@ -119,8 +115,6 @@ public void uploadFileRequiredFilename(UploadFileRequiredFilenameRequest body) {
@Metadata(properties = { MetadataProperties.GENERATED })
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> uploadFileArrayWithResponse(UploadFileArrayRequest body, RequestContext requestContext) {
// Operation 'uploadFileArray' is of content-type 'multipart/form-data'. Protocol API is not usable and hence
// not generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.File.uploadFileArray",
requestContext, updatedContext -> this.serviceClient.uploadFileArrayWithResponse(body, updatedContext));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public final class FormDataHttpPartsClient {
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> jsonArrayAndFileArrayWithResponse(ComplexHttpPartsModelRequest body,
RequestContext requestContext) {
// Operation 'jsonArrayAndFileArray' is of content-type 'multipart/form-data'. Protocol API is not usable and
// hence not generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.HttpParts.jsonArrayAndFileArray",
requestContext,
updatedContext -> this.serviceClient.jsonArrayAndFileArrayWithResponse(body, updatedContext));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public final class FormDataHttpPartsContentTypeClient {
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> imageJpegContentTypeWithResponse(FileWithHttpPartSpecificContentTypeRequest body,
RequestContext requestContext) {
// Operation 'imageJpegContentType' is of content-type 'multipart/form-data'. Protocol API is not usable and
// hence not generated.
return this.instrumentation.instrumentWithResponse(
"Payload.MultiPart.FormData.HttpParts.ContentType.imageJpegContentType", requestContext,
updatedContext -> this.serviceClient.imageJpegContentTypeWithResponse(body, updatedContext));
Expand Down Expand Up @@ -83,8 +81,6 @@ public void imageJpegContentType(FileWithHttpPartSpecificContentTypeRequest body
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> requiredContentTypeWithResponse(FileWithHttpPartRequiredContentTypeRequest body,
RequestContext requestContext) {
// Operation 'requiredContentType' is of content-type 'multipart/form-data'. Protocol API is not usable and
// hence not generated.
return this.instrumentation.instrumentWithResponse(
"Payload.MultiPart.FormData.HttpParts.ContentType.requiredContentType", requestContext,
updatedContext -> this.serviceClient.requiredContentTypeWithResponse(body, updatedContext));
Expand Down Expand Up @@ -118,8 +114,6 @@ public void requiredContentType(FileWithHttpPartRequiredContentTypeRequest body)
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> optionalContentTypeWithResponse(FileWithHttpPartOptionalContentTypeRequest body,
RequestContext requestContext) {
// Operation 'optionalContentType' is of content-type 'multipart/form-data'. Protocol API is not usable and
// hence not generated.
return this.instrumentation.instrumentWithResponse(
"Payload.MultiPart.FormData.HttpParts.ContentType.optionalContentType", requestContext,
updatedContext -> this.serviceClient.optionalContentTypeWithResponse(body, updatedContext));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public final class FormDataHttpPartsNonStringClient {
@Metadata(properties = { MetadataProperties.GENERATED })
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> floatMethodWithResponse(FloatRequest body, RequestContext requestContext) {
// Operation 'float' is of content-type 'multipart/form-data'. Protocol API is not usable and hence not
// generated.
return this.instrumentation.instrumentWithResponse("Payload.MultiPart.FormData.HttpParts.NonString.float",
requestContext, updatedContext -> this.serviceClient.floatMethodWithResponse(body, updatedContext));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package type.file;

/**
* Defines values for DownloadFileMultipleContentTypesContentType.
*/
public enum DownloadFileMultipleContentTypesContentType {
/**
* Enum value image/png.
*/
IMAGE_PNG("image/png"),

/**
* Enum value image/jpeg.
*/
IMAGE_JPEG("image/jpeg");

/**
* The actual serialized value for a DownloadFileMultipleContentTypesContentType instance.
*/
private final String value;

DownloadFileMultipleContentTypesContentType(String value) {
this.value = value;
}

/**
* Parses a serialized value to a DownloadFileMultipleContentTypesContentType instance.
*
* @param value the serialized value to parse.
* @return the parsed DownloadFileMultipleContentTypesContentType object, or null if unable to parse.
*/
public static DownloadFileMultipleContentTypesContentType fromString(String value) {
if (value == null) {
return null;
}
DownloadFileMultipleContentTypesContentType[] items = DownloadFileMultipleContentTypesContentType.values();
for (DownloadFileMultipleContentTypesContentType item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
}

/**
* {@inheritDoc}
*/
@Override
public String toString() {
return this.value;
}
}
Loading
Loading