http-client-java, compiler 0.46 (#4393)

This commit is contained in:
Weidong Xu 2024-09-11 11:08:01 +08:00 коммит произвёл GitHub
Родитель 0be9e8f22b
Коммит 2010bc4490
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
19 изменённых файлов: 1070 добавлений и 1126 удалений

Просмотреть файл

@ -17,16 +17,16 @@
"@typespec/http-client-java-tests": "file:" "@typespec/http-client-java-tests": "file:"
}, },
"overrides": { "overrides": {
"@typespec/compiler": "~0.59.0", "@typespec/compiler": "~0.60.0",
"@typespec/http": "~0.59.0", "@typespec/http": "~0.60.0",
"@typespec/rest": "~0.59.0", "@typespec/rest": "~0.60.0",
"@typespec/versioning": "~0.59.0", "@typespec/versioning": "~0.60.0",
"@typespec/openapi": "~0.59.0", "@typespec/openapi": "~0.60.0",
"@typespec/xml": "~0.59.0", "@typespec/xml": "~0.60.0",
"@azure-tools/typespec-azure-core": "~0.45.0", "@azure-tools/typespec-azure-core": "~0.46.0",
"@azure-tools/typespec-client-generator-core": "~0.45.0", "@azure-tools/typespec-client-generator-core": "~0.46.0",
"@azure-tools/typespec-azure-resource-manager": "~0.45.0", "@azure-tools/typespec-azure-resource-manager": "~0.46.0",
"@azure-tools/typespec-autorest": "~0.45.0" "@azure-tools/typespec-autorest": "~0.46.0"
}, },
"private": true "private": true
} }

Просмотреть файл

@ -0,0 +1,287 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.cadl.naming;
import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.client.traits.ConfigurationTrait;
import com.azure.core.client.traits.EndpointTrait;
import com.azure.core.client.traits.HttpTrait;
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.AddHeadersPolicy;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.util.ClientOptions;
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.builder.ClientBuilderUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.serializer.JacksonAdapter;
import com.cadl.naming.implementation.NamingClientImpl;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* A builder for creating a new instance of the NamingClient type.
*/
@ServiceClientBuilder(serviceClients = { NamingClient.class, NamingAsyncClient.class })
public final class NamingClientBuilder implements HttpTrait<NamingClientBuilder>,
ConfigurationTrait<NamingClientBuilder>, EndpointTrait<NamingClientBuilder> {
@Generated
private static final String SDK_NAME = "name";
@Generated
private static final String SDK_VERSION = "version";
@Generated
private static final Map<String, String> PROPERTIES = CoreUtils.getProperties("cadl-naming.properties");
@Generated
private final List<HttpPipelinePolicy> pipelinePolicies;
/**
* Create an instance of the NamingClientBuilder.
*/
@Generated
public NamingClientBuilder() {
this.pipelinePolicies = new ArrayList<>();
}
/*
* The HTTP pipeline to send requests through.
*/
@Generated
private HttpPipeline pipeline;
/**
* {@inheritDoc}.
*/
@Generated
@Override
public NamingClientBuilder pipeline(HttpPipeline pipeline) {
if (this.pipeline != null && pipeline == null) {
LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured.");
}
this.pipeline = pipeline;
return this;
}
/*
* The HTTP client used to send the request.
*/
@Generated
private HttpClient httpClient;
/**
* {@inheritDoc}.
*/
@Generated
@Override
public NamingClientBuilder httpClient(HttpClient httpClient) {
this.httpClient = httpClient;
return this;
}
/*
* The logging configuration for HTTP requests and responses.
*/
@Generated
private HttpLogOptions httpLogOptions;
/**
* {@inheritDoc}.
*/
@Generated
@Override
public NamingClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
this.httpLogOptions = httpLogOptions;
return this;
}
/*
* The client options such as application ID and custom headers to set on a request.
*/
@Generated
private ClientOptions clientOptions;
/**
* {@inheritDoc}.
*/
@Generated
@Override
public NamingClientBuilder clientOptions(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
return this;
}
/*
* The retry options to configure retry policy for failed requests.
*/
@Generated
private RetryOptions retryOptions;
/**
* {@inheritDoc}.
*/
@Generated
@Override
public NamingClientBuilder retryOptions(RetryOptions retryOptions) {
this.retryOptions = retryOptions;
return this;
}
/**
* {@inheritDoc}.
*/
@Generated
@Override
public NamingClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null.");
pipelinePolicies.add(customPolicy);
return this;
}
/*
* The configuration store that is used during construction of the service client.
*/
@Generated
private Configuration configuration;
/**
* {@inheritDoc}.
*/
@Generated
@Override
public NamingClientBuilder configuration(Configuration configuration) {
this.configuration = configuration;
return this;
}
/*
* The service endpoint
*/
@Generated
private String endpoint;
/**
* {@inheritDoc}.
*/
@Generated
@Override
public NamingClientBuilder endpoint(String endpoint) {
this.endpoint = endpoint;
return this;
}
/*
* The retry policy that will attempt to retry failed requests, if applicable.
*/
@Generated
private RetryPolicy retryPolicy;
/**
* Sets The retry policy that will attempt to retry failed requests, if applicable.
*
* @param retryPolicy the retryPolicy value.
* @return the NamingClientBuilder.
*/
@Generated
public NamingClientBuilder retryPolicy(RetryPolicy retryPolicy) {
this.retryPolicy = retryPolicy;
return this;
}
/**
* Builds an instance of NamingClientImpl with the provided parameters.
*
* @return an instance of NamingClientImpl.
*/
@Generated
private NamingClientImpl buildInnerClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
NamingClientImpl client
= new NamingClientImpl(localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint);
return client;
}
@Generated
private void validateClient() {
// This method is invoked from 'buildInnerClient'/'buildClient' method.
// Developer can customize this method, to validate that the necessary conditions are met for the new client.
Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
}
@Generated
private HttpPipeline createHttpPipeline() {
Configuration buildConfiguration
= (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;
HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions;
ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions;
List<HttpPipelinePolicy> policies = new ArrayList<>();
String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName");
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions);
policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration));
policies.add(new RequestIdPolicy());
policies.add(new AddHeadersFromContextPolicy());
HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions);
if (headers != null) {
policies.add(new AddHeadersPolicy(headers));
}
this.pipelinePolicies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.forEach(p -> policies.add(p));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy()));
policies.add(new AddDatePolicy());
this.pipelinePolicies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.forEach(p -> policies.add(p));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(localHttpLogOptions));
HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
.httpClient(httpClient)
.clientOptions(localClientOptions)
.build();
return httpPipeline;
}
/**
* Builds an instance of NamingAsyncClient class.
*
* @return an instance of NamingAsyncClient.
*/
@Generated
public NamingAsyncClient buildAsyncClient() {
return new NamingAsyncClient(buildInnerClient().getNamingOps());
}
/**
* Builds an instance of NamingClient class.
*
* @return an instance of NamingClient.
*/
@Generated
public NamingClient buildClient() {
return new NamingClient(buildInnerClient().getNamingOps());
}
private static final ClientLogger LOGGER = new ClientLogger(NamingClientBuilder.class);
}

Просмотреть файл

@ -0,0 +1,273 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.cadl.naming.implementation;
import com.azure.core.annotation.BodyParam;
import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Get;
import com.azure.core.annotation.HeaderParam;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.Post;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.UnexpectedResponseExceptionType;
import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import reactor.core.publisher.Mono;
/**
* An instance of this class provides access to all the operations defined in NamingOps.
*/
public final class NamingOpsImpl {
/**
* The proxy service used to perform REST calls.
*/
private final NamingOpsService service;
/**
* The service client containing this operation class.
*/
private final NamingClientImpl client;
/**
* Initializes an instance of NamingOpsImpl.
*
* @param client the instance of the service client containing this operation class.
*/
NamingOpsImpl(NamingClientImpl client) {
this.service
= RestProxy.create(NamingOpsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
* The interface defining all the services for NamingClientNamingOps to be used by the proxy service to perform REST
* calls.
*/
@Host("{endpoint}")
@ServiceInterface(name = "NamingClientNamingOp")
public interface NamingOpsService {
@Post("/naming")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono<Response<BinaryData>> post(@HostParam("endpoint") String endpoint, @QueryParam("name") String name,
@HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
@BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context);
@Post("/naming")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response<BinaryData> postSync(@HostParam("endpoint") String endpoint, @QueryParam("name") String name,
@HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
@BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context);
@Get("/naming")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono<Response<BinaryData>> getAnonymous(@HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
@Get("/naming")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response<BinaryData> getAnonymousSync(@HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
}
/**
* summary of POST op
*
* description of POST op.
* <p><strong>Header Parameters</strong></p>
* <table border="1">
* <caption>Header Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>etag</td><td>String</td><td>No</td><td>summary of etag header parameter
*
* description of etag header parameter</td></tr>
* </table>
* You can add these to a request with {@link RequestOptions#addHeader}
* <p><strong>Request Body Schema</strong></p>
*
* <pre>{@code
* {
* parameters (Optional): {
* type: String(Type1/Type2) (Required)
* }
* }
* }</pre>
*
* <p><strong>Response Body Schema</strong></p>
*
* <pre>{@code
* {
* name: String (Required)
* data (Required): {
* data (Required): {
* &#64;data.kind: String (Required)
* }
* }
* type: String(Blob/File) (Required)
* status: String(Running/Completed/Failed) (Required)
* anonymous (Required): {
* last_error (Required): {
* code: String(server_error/rate_limit_exceeded/invalid_prompt) (Required)
* }
* }
* }
* }</pre>
*
* @param name summary of name query parameter
*
* description of name query parameter.
* @param body The body parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return summary of Response along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> postWithResponseAsync(String name, BinaryData body,
RequestOptions requestOptions) {
final String contentType = "application/json";
final String accept = "application/json";
return FluxUtil.withContext(context -> service.post(this.client.getEndpoint(), name, contentType, accept, body,
requestOptions, context));
}
/**
* summary of POST op
*
* description of POST op.
* <p><strong>Header Parameters</strong></p>
* <table border="1">
* <caption>Header Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>etag</td><td>String</td><td>No</td><td>summary of etag header parameter
*
* description of etag header parameter</td></tr>
* </table>
* You can add these to a request with {@link RequestOptions#addHeader}
* <p><strong>Request Body Schema</strong></p>
*
* <pre>{@code
* {
* parameters (Optional): {
* type: String(Type1/Type2) (Required)
* }
* }
* }</pre>
*
* <p><strong>Response Body Schema</strong></p>
*
* <pre>{@code
* {
* name: String (Required)
* data (Required): {
* data (Required): {
* &#64;data.kind: String (Required)
* }
* }
* type: String(Blob/File) (Required)
* status: String(Running/Completed/Failed) (Required)
* anonymous (Required): {
* last_error (Required): {
* code: String(server_error/rate_limit_exceeded/invalid_prompt) (Required)
* }
* }
* }
* }</pre>
*
* @param name summary of name query parameter
*
* description of name query parameter.
* @param body The body parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return summary of Response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<BinaryData> postWithResponse(String name, BinaryData body, RequestOptions requestOptions) {
final String contentType = "application/json";
final String accept = "application/json";
return service.postSync(this.client.getEndpoint(), name, contentType, accept, body, requestOptions,
Context.NONE);
}
/**
* The getAnonymous operation.
* <p><strong>Response Body Schema</strong></p>
*
* <pre>{@code
* {
* name: String (Required)
* }
* }</pre>
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return the response body along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> getAnonymousWithResponseAsync(RequestOptions requestOptions) {
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.getAnonymous(this.client.getEndpoint(), accept, requestOptions, context));
}
/**
* The getAnonymous operation.
* <p><strong>Response Body Schema</strong></p>
*
* <pre>{@code
* {
* name: String (Required)
* }
* }</pre>
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<BinaryData> getAnonymousWithResponse(RequestOptions requestOptions) {
final String accept = "application/json";
return service.getAnonymousSync(this.client.getEndpoint(), accept, requestOptions, Context.NONE);
}
}

Просмотреть файл

@ -4,8 +4,8 @@
/** /**
* <!-- start generated doc --> * <!-- start generated doc -->
* Package containing the data models for BodyOptionality. * Package containing the implementations for Naming.
* Test describing optionality of the request body. * description of Naming.
* <!-- end generated doc --> * <!-- end generated doc -->
*/ */
package com.parameters.bodyoptionality.implementation.models; package com.cadl.naming.implementation;

Просмотреть файл

@ -0,0 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
* <!-- start generated doc -->
* Package containing the data models for Naming.
* description of Naming.
* <!-- end generated doc -->
*/
package com.cadl.naming.models;

Просмотреть файл

@ -0,0 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
* <!-- start generated doc -->
* Package containing the classes for Naming.
* description of Naming.
* <!-- end generated doc -->
*/
package com.cadl.naming;

Просмотреть файл

@ -17,7 +17,6 @@ import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData; import com.azure.core.util.BinaryData;
import com.azure.core.util.FluxUtil; import com.azure.core.util.FluxUtil;
import com.parameters.bodyoptionality.implementation.BodyOptionalityClientImpl; import com.parameters.bodyoptionality.implementation.BodyOptionalityClientImpl;
import com.parameters.bodyoptionality.implementation.models.RequiredImplicitRequest;
import com.parameters.bodyoptionality.models.BodyModel; import com.parameters.bodyoptionality.models.BodyModel;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
@ -73,7 +72,7 @@ public final class BodyOptionalityAsyncClient {
* } * }
* }</pre> * }</pre>
* *
* @param requiredImplicitRequest The requiredImplicitRequest parameter. * @param bodyModel The bodyModel parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server. * @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@ -83,9 +82,8 @@ public final class BodyOptionalityAsyncClient {
*/ */
@Generated @Generated
@ServiceMethod(returns = ReturnType.SINGLE) @ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> requiredImplicitWithResponse(BinaryData requiredImplicitRequest, public Mono<Response<Void>> requiredImplicitWithResponse(BinaryData bodyModel, RequestOptions requestOptions) {
RequestOptions requestOptions) { return this.serviceClient.requiredImplicitWithResponseAsync(bodyModel, requestOptions);
return this.serviceClient.requiredImplicitWithResponseAsync(requiredImplicitRequest, requestOptions);
} }
/** /**
@ -125,8 +123,8 @@ public final class BodyOptionalityAsyncClient {
public Mono<Void> requiredImplicit(String name) { public Mono<Void> requiredImplicit(String name) {
// Generated convenience method for requiredImplicitWithResponse // Generated convenience method for requiredImplicitWithResponse
RequestOptions requestOptions = new RequestOptions(); RequestOptions requestOptions = new RequestOptions();
RequiredImplicitRequest requiredImplicitRequestObj = new RequiredImplicitRequest(name); BodyModel bodyModelObj = new BodyModel(name);
BinaryData requiredImplicitRequest = BinaryData.fromObject(requiredImplicitRequestObj); BinaryData bodyModel = BinaryData.fromObject(bodyModelObj);
return requiredImplicitWithResponse(requiredImplicitRequest, requestOptions).flatMap(FluxUtil::toMono); return requiredImplicitWithResponse(bodyModel, requestOptions).flatMap(FluxUtil::toMono);
} }
} }

Просмотреть файл

@ -16,7 +16,6 @@ import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response; import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData; import com.azure.core.util.BinaryData;
import com.parameters.bodyoptionality.implementation.BodyOptionalityClientImpl; import com.parameters.bodyoptionality.implementation.BodyOptionalityClientImpl;
import com.parameters.bodyoptionality.implementation.models.RequiredImplicitRequest;
import com.parameters.bodyoptionality.models.BodyModel; import com.parameters.bodyoptionality.models.BodyModel;
/** /**
@ -71,7 +70,7 @@ public final class BodyOptionalityClient {
* } * }
* }</pre> * }</pre>
* *
* @param requiredImplicitRequest The requiredImplicitRequest parameter. * @param bodyModel The bodyModel parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server. * @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@ -81,9 +80,8 @@ public final class BodyOptionalityClient {
*/ */
@Generated @Generated
@ServiceMethod(returns = ReturnType.SINGLE) @ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> requiredImplicitWithResponse(BinaryData requiredImplicitRequest, public Response<Void> requiredImplicitWithResponse(BinaryData bodyModel, RequestOptions requestOptions) {
RequestOptions requestOptions) { return this.serviceClient.requiredImplicitWithResponse(bodyModel, requestOptions);
return this.serviceClient.requiredImplicitWithResponse(requiredImplicitRequest, requestOptions);
} }
/** /**
@ -121,8 +119,8 @@ public final class BodyOptionalityClient {
public void requiredImplicit(String name) { public void requiredImplicit(String name) {
// Generated convenience method for requiredImplicitWithResponse // Generated convenience method for requiredImplicitWithResponse
RequestOptions requestOptions = new RequestOptions(); RequestOptions requestOptions = new RequestOptions();
RequiredImplicitRequest requiredImplicitRequestObj = new RequiredImplicitRequest(name); BodyModel bodyModelObj = new BodyModel(name);
BinaryData requiredImplicitRequest = BinaryData.fromObject(requiredImplicitRequestObj); BinaryData bodyModel = BinaryData.fromObject(bodyModelObj);
requiredImplicitWithResponse(requiredImplicitRequest, requestOptions).getValue(); requiredImplicitWithResponse(bodyModel, requestOptions).getValue();
} }
} }

Просмотреть файл

@ -167,9 +167,8 @@ public final class BodyOptionalityClientImpl {
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class) @UnexpectedResponseExceptionType(HttpResponseException.class)
Mono<Response<Void>> requiredImplicit(@HostParam("endpoint") String endpoint, Mono<Response<Void>> requiredImplicit(@HostParam("endpoint") String endpoint,
@HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData bodyModel,
@BodyParam("application/json") BinaryData requiredImplicitRequest, RequestOptions requestOptions, RequestOptions requestOptions, Context context);
Context context);
@Post("/parameters/body-optionality/required-implicit") @Post("/parameters/body-optionality/required-implicit")
@ExpectedResponses({ 204 }) @ExpectedResponses({ 204 })
@ -178,9 +177,8 @@ public final class BodyOptionalityClientImpl {
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class) @UnexpectedResponseExceptionType(HttpResponseException.class)
Response<Void> requiredImplicitSync(@HostParam("endpoint") String endpoint, Response<Void> requiredImplicitSync(@HostParam("endpoint") String endpoint,
@HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData bodyModel,
@BodyParam("application/json") BinaryData requiredImplicitRequest, RequestOptions requestOptions, RequestOptions requestOptions, Context context);
Context context);
} }
/** /**
@ -242,7 +240,7 @@ public final class BodyOptionalityClientImpl {
* } * }
* }</pre> * }</pre>
* *
* @param requiredImplicitRequest The requiredImplicitRequest parameter. * @param bodyModel The bodyModel parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server. * @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@ -251,11 +249,10 @@ public final class BodyOptionalityClientImpl {
* @return the {@link Response} on successful completion of {@link Mono}. * @return the {@link Response} on successful completion of {@link Mono}.
*/ */
@ServiceMethod(returns = ReturnType.SINGLE) @ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> requiredImplicitWithResponseAsync(BinaryData requiredImplicitRequest, public Mono<Response<Void>> requiredImplicitWithResponseAsync(BinaryData bodyModel, RequestOptions requestOptions) {
RequestOptions requestOptions) {
final String contentType = "application/json"; final String contentType = "application/json";
return FluxUtil.withContext(context -> service.requiredImplicit(this.getEndpoint(), contentType, return FluxUtil.withContext(
requiredImplicitRequest, requestOptions, context)); context -> service.requiredImplicit(this.getEndpoint(), contentType, bodyModel, requestOptions, context));
} }
/** /**
@ -268,7 +265,7 @@ public final class BodyOptionalityClientImpl {
* } * }
* }</pre> * }</pre>
* *
* @param requiredImplicitRequest The requiredImplicitRequest parameter. * @param bodyModel The bodyModel parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server. * @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@ -277,10 +274,8 @@ public final class BodyOptionalityClientImpl {
* @return the {@link Response}. * @return the {@link Response}.
*/ */
@ServiceMethod(returns = ReturnType.SINGLE) @ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> requiredImplicitWithResponse(BinaryData requiredImplicitRequest, public Response<Void> requiredImplicitWithResponse(BinaryData bodyModel, RequestOptions requestOptions) {
RequestOptions requestOptions) {
final String contentType = "application/json"; final String contentType = "application/json";
return service.requiredImplicitSync(this.getEndpoint(), contentType, requiredImplicitRequest, requestOptions, return service.requiredImplicitSync(this.getEndpoint(), contentType, bodyModel, requestOptions, Context.NONE);
Context.NONE);
} }
} }

Просмотреть файл

@ -1,83 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.parameters.bodyoptionality.implementation.models;
import com.azure.core.annotation.Generated;
import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* The RequiredImplicitRequest model.
*/
@Immutable
public final class RequiredImplicitRequest implements JsonSerializable<RequiredImplicitRequest> {
/*
* The name property.
*/
@Generated
private final String name;
/**
* Creates an instance of RequiredImplicitRequest class.
*
* @param name the name value to set.
*/
@Generated
public RequiredImplicitRequest(String name) {
this.name = name;
}
/**
* Get the name property: The name property.
*
* @return the name value.
*/
@Generated
public String getName() {
return this.name;
}
/**
* {@inheritDoc}
*/
@Generated
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("name", this.name);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of RequiredImplicitRequest from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of RequiredImplicitRequest if the JsonReader was pointing to an instance of it, or null if it
* was pointing to JSON null.
* @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the RequiredImplicitRequest.
*/
@Generated
public static RequiredImplicitRequest fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
String name = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("name".equals(fieldName)) {
name = reader.getString();
} else {
reader.skipChildren();
}
}
return new RequiredImplicitRequest(name);
});
}
}

Просмотреть файл

@ -17,7 +17,6 @@ import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData; import com.azure.core.util.BinaryData;
import com.azure.core.util.FluxUtil; import com.azure.core.util.FluxUtil;
import com.parameters.spread.implementation.ModelsImpl; import com.parameters.spread.implementation.ModelsImpl;
import com.parameters.spread.implementation.models.SpreadAsRequestBodyRequest1;
import com.parameters.spread.implementation.models.SpreadCompositeRequestMixRequest; import com.parameters.spread.implementation.models.SpreadCompositeRequestMixRequest;
import com.parameters.spread.models.BodyParameter; import com.parameters.spread.models.BodyParameter;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
@ -50,7 +49,7 @@ public final class ModelAsyncClient {
* } * }
* }</pre> * }</pre>
* *
* @param spreadAsRequestBodyRequest1 The spreadAsRequestBodyRequest1 parameter. * @param bodyParameter The bodyParameter parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server. * @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@ -60,9 +59,9 @@ public final class ModelAsyncClient {
*/ */
@Generated @Generated
@ServiceMethod(returns = ReturnType.SINGLE) @ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> spreadAsRequestBodyWithResponse(BinaryData spreadAsRequestBodyRequest1, public Mono<Response<Void>> spreadAsRequestBodyWithResponse(BinaryData bodyParameter,
RequestOptions requestOptions) { RequestOptions requestOptions) {
return this.serviceClient.spreadAsRequestBodyWithResponseAsync(spreadAsRequestBodyRequest1, requestOptions); return this.serviceClient.spreadAsRequestBodyWithResponseAsync(bodyParameter, requestOptions);
} }
/** /**
@ -181,9 +180,9 @@ public final class ModelAsyncClient {
public Mono<Void> spreadAsRequestBody(String name) { public Mono<Void> spreadAsRequestBody(String name) {
// Generated convenience method for spreadAsRequestBodyWithResponse // Generated convenience method for spreadAsRequestBodyWithResponse
RequestOptions requestOptions = new RequestOptions(); RequestOptions requestOptions = new RequestOptions();
SpreadAsRequestBodyRequest1 spreadAsRequestBodyRequest1Obj = new SpreadAsRequestBodyRequest1(name); BodyParameter bodyParameterObj = new BodyParameter(name);
BinaryData spreadAsRequestBodyRequest1 = BinaryData.fromObject(spreadAsRequestBodyRequest1Obj); BinaryData bodyParameter = BinaryData.fromObject(bodyParameterObj);
return spreadAsRequestBodyWithResponse(spreadAsRequestBodyRequest1, requestOptions).flatMap(FluxUtil::toMono); return spreadAsRequestBodyWithResponse(bodyParameter, requestOptions).flatMap(FluxUtil::toMono);
} }
/** /**

Просмотреть файл

@ -16,7 +16,6 @@ import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response; import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData; import com.azure.core.util.BinaryData;
import com.parameters.spread.implementation.ModelsImpl; import com.parameters.spread.implementation.ModelsImpl;
import com.parameters.spread.implementation.models.SpreadAsRequestBodyRequest1;
import com.parameters.spread.implementation.models.SpreadCompositeRequestMixRequest; import com.parameters.spread.implementation.models.SpreadCompositeRequestMixRequest;
import com.parameters.spread.models.BodyParameter; import com.parameters.spread.models.BodyParameter;
@ -48,7 +47,7 @@ public final class ModelClient {
* } * }
* }</pre> * }</pre>
* *
* @param spreadAsRequestBodyRequest1 The spreadAsRequestBodyRequest1 parameter. * @param bodyParameter The bodyParameter parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server. * @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@ -58,9 +57,8 @@ public final class ModelClient {
*/ */
@Generated @Generated
@ServiceMethod(returns = ReturnType.SINGLE) @ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> spreadAsRequestBodyWithResponse(BinaryData spreadAsRequestBodyRequest1, public Response<Void> spreadAsRequestBodyWithResponse(BinaryData bodyParameter, RequestOptions requestOptions) {
RequestOptions requestOptions) { return this.serviceClient.spreadAsRequestBodyWithResponse(bodyParameter, requestOptions);
return this.serviceClient.spreadAsRequestBodyWithResponse(spreadAsRequestBodyRequest1, requestOptions);
} }
/** /**
@ -178,9 +176,9 @@ public final class ModelClient {
public void spreadAsRequestBody(String name) { public void spreadAsRequestBody(String name) {
// Generated convenience method for spreadAsRequestBodyWithResponse // Generated convenience method for spreadAsRequestBodyWithResponse
RequestOptions requestOptions = new RequestOptions(); RequestOptions requestOptions = new RequestOptions();
SpreadAsRequestBodyRequest1 spreadAsRequestBodyRequest1Obj = new SpreadAsRequestBodyRequest1(name); BodyParameter bodyParameterObj = new BodyParameter(name);
BinaryData spreadAsRequestBodyRequest1 = BinaryData.fromObject(spreadAsRequestBodyRequest1Obj); BinaryData bodyParameter = BinaryData.fromObject(bodyParameterObj);
spreadAsRequestBodyWithResponse(spreadAsRequestBodyRequest1, requestOptions).getValue(); spreadAsRequestBodyWithResponse(bodyParameter, requestOptions).getValue();
} }
/** /**

Просмотреть файл

@ -65,9 +65,8 @@ public final class ModelsImpl {
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class) @UnexpectedResponseExceptionType(HttpResponseException.class)
Mono<Response<Void>> spreadAsRequestBody(@HostParam("endpoint") String endpoint, Mono<Response<Void>> spreadAsRequestBody(@HostParam("endpoint") String endpoint,
@HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData bodyParameter,
@BodyParam("application/json") BinaryData spreadAsRequestBodyRequest1, RequestOptions requestOptions, RequestOptions requestOptions, Context context);
Context context);
@Put("/parameters/spread/model/request-body") @Put("/parameters/spread/model/request-body")
@ExpectedResponses({ 204 }) @ExpectedResponses({ 204 })
@ -76,9 +75,8 @@ public final class ModelsImpl {
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class) @UnexpectedResponseExceptionType(HttpResponseException.class)
Response<Void> spreadAsRequestBodySync(@HostParam("endpoint") String endpoint, Response<Void> spreadAsRequestBodySync(@HostParam("endpoint") String endpoint,
@HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData bodyParameter,
@BodyParam("application/json") BinaryData spreadAsRequestBodyRequest1, RequestOptions requestOptions, RequestOptions requestOptions, Context context);
Context context);
@Put("/parameters/spread/model/composite-request-only-with-body") @Put("/parameters/spread/model/composite-request-only-with-body")
@ExpectedResponses({ 204 }) @ExpectedResponses({ 204 })
@ -177,7 +175,7 @@ public final class ModelsImpl {
* } * }
* }</pre> * }</pre>
* *
* @param spreadAsRequestBodyRequest1 The spreadAsRequestBodyRequest1 parameter. * @param bodyParameter The bodyParameter parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server. * @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@ -186,11 +184,11 @@ public final class ModelsImpl {
* @return the {@link Response} on successful completion of {@link Mono}. * @return the {@link Response} on successful completion of {@link Mono}.
*/ */
@ServiceMethod(returns = ReturnType.SINGLE) @ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> spreadAsRequestBodyWithResponseAsync(BinaryData spreadAsRequestBodyRequest1, public Mono<Response<Void>> spreadAsRequestBodyWithResponseAsync(BinaryData bodyParameter,
RequestOptions requestOptions) { RequestOptions requestOptions) {
final String contentType = "application/json"; final String contentType = "application/json";
return FluxUtil.withContext(context -> service.spreadAsRequestBody(this.client.getEndpoint(), contentType, return FluxUtil.withContext(context -> service.spreadAsRequestBody(this.client.getEndpoint(), contentType,
spreadAsRequestBodyRequest1, requestOptions, context)); bodyParameter, requestOptions, context));
} }
/** /**
@ -203,7 +201,7 @@ public final class ModelsImpl {
* } * }
* }</pre> * }</pre>
* *
* @param spreadAsRequestBodyRequest1 The spreadAsRequestBodyRequest1 parameter. * @param bodyParameter The bodyParameter parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server. * @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@ -212,11 +210,10 @@ public final class ModelsImpl {
* @return the {@link Response}. * @return the {@link Response}.
*/ */
@ServiceMethod(returns = ReturnType.SINGLE) @ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> spreadAsRequestBodyWithResponse(BinaryData spreadAsRequestBodyRequest1, public Response<Void> spreadAsRequestBodyWithResponse(BinaryData bodyParameter, RequestOptions requestOptions) {
RequestOptions requestOptions) {
final String contentType = "application/json"; final String contentType = "application/json";
return service.spreadAsRequestBodySync(this.client.getEndpoint(), contentType, spreadAsRequestBodyRequest1, return service.spreadAsRequestBodySync(this.client.getEndpoint(), contentType, bodyParameter, requestOptions,
requestOptions, Context.NONE); Context.NONE);
} }
/** /**

Просмотреть файл

@ -1,83 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.parameters.spread.implementation.models;
import com.azure.core.annotation.Generated;
import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* The SpreadAsRequestBodyRequest1 model.
*/
@Immutable
public final class SpreadAsRequestBodyRequest1 implements JsonSerializable<SpreadAsRequestBodyRequest1> {
/*
* The name property.
*/
@Generated
private final String name;
/**
* Creates an instance of SpreadAsRequestBodyRequest1 class.
*
* @param name the name value to set.
*/
@Generated
public SpreadAsRequestBodyRequest1(String name) {
this.name = name;
}
/**
* Get the name property: The name property.
*
* @return the name value.
*/
@Generated
public String getName() {
return this.name;
}
/**
* {@inheritDoc}
*/
@Generated
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("name", this.name);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SpreadAsRequestBodyRequest1 from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SpreadAsRequestBodyRequest1 if the JsonReader was pointing to an instance of it, or null
* if it was pointing to JSON null.
* @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the SpreadAsRequestBodyRequest1.
*/
@Generated
public static SpreadAsRequestBodyRequest1 fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
String name = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("name".equals(fieldName)) {
name = reader.getString();
} else {
reader.skipChildren();
}
}
return new SpreadAsRequestBodyRequest1(name);
});
}
}

Просмотреть файл

@ -22,7 +22,6 @@
"com.parameters.bodyoptionality.OptionalExplicitClient.omitWithResponse": "Parameters.BodyOptionality.OptionalExplicit.omit", "com.parameters.bodyoptionality.OptionalExplicitClient.omitWithResponse": "Parameters.BodyOptionality.OptionalExplicit.omit",
"com.parameters.bodyoptionality.OptionalExplicitClient.set": "Parameters.BodyOptionality.OptionalExplicit.set", "com.parameters.bodyoptionality.OptionalExplicitClient.set": "Parameters.BodyOptionality.OptionalExplicit.set",
"com.parameters.bodyoptionality.OptionalExplicitClient.setWithResponse": "Parameters.BodyOptionality.OptionalExplicit.set", "com.parameters.bodyoptionality.OptionalExplicitClient.setWithResponse": "Parameters.BodyOptionality.OptionalExplicit.set",
"com.parameters.bodyoptionality.implementation.models.RequiredImplicitRequest": "Parameters.BodyOptionality.requiredImplicit.Request.anonymous",
"com.parameters.bodyoptionality.models.BodyModel": "Parameters.BodyOptionality.BodyModel" "com.parameters.bodyoptionality.models.BodyModel": "Parameters.BodyOptionality.BodyModel"
} }
} }

Просмотреть файл

@ -47,7 +47,6 @@
"com.parameters.spread.ModelClient.spreadCompositeRequestWithoutBodyWithResponse": "Parameters.Spread.Model.spreadCompositeRequestWithoutBody", "com.parameters.spread.ModelClient.spreadCompositeRequestWithoutBodyWithResponse": "Parameters.Spread.Model.spreadCompositeRequestWithoutBody",
"com.parameters.spread.SpreadClientBuilder": "Parameters.Spread", "com.parameters.spread.SpreadClientBuilder": "Parameters.Spread",
"com.parameters.spread.implementation.models.SpreadAsRequestBodyRequest": "Parameters.Spread.Alias.spreadAsRequestBody.Request.anonymous", "com.parameters.spread.implementation.models.SpreadAsRequestBodyRequest": "Parameters.Spread.Alias.spreadAsRequestBody.Request.anonymous",
"com.parameters.spread.implementation.models.SpreadAsRequestBodyRequest1": "Parameters.Spread.Model.spreadAsRequestBody.Request.anonymous",
"com.parameters.spread.implementation.models.SpreadAsRequestParameterRequest": "spreadAsRequestParameter.Request.anonymous", "com.parameters.spread.implementation.models.SpreadAsRequestParameterRequest": "spreadAsRequestParameter.Request.anonymous",
"com.parameters.spread.implementation.models.SpreadCompositeRequestMixRequest": "spreadCompositeRequestMix.Request.anonymous", "com.parameters.spread.implementation.models.SpreadCompositeRequestMixRequest": "spreadCompositeRequestMix.Request.anonymous",
"com.parameters.spread.implementation.models.SpreadParameterWithInnerAliasRequest": "spreadParameterWithInnerAlias.Request.anonymous", "com.parameters.spread.implementation.models.SpreadParameterWithInnerAliasRequest": "spreadParameterWithInnerAlias.Request.anonymous",

Просмотреть файл

@ -0,0 +1,2 @@
name=${project.artifactId}
version=${project.version}

1257
packages/http-client-java/package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -42,15 +42,15 @@
"generator/http-client-generator/target/emitter.jar" "generator/http-client-generator/target/emitter.jar"
], ],
"peerDependencies": { "peerDependencies": {
"@azure-tools/typespec-autorest": ">=0.45.0 <1.0.0", "@azure-tools/typespec-autorest": ">=0.46.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.45.0 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.46.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.45.4 <1.0.0", "@azure-tools/typespec-client-generator-core": ">=0.46.0 <1.0.0",
"@typespec/compiler": ">=0.59.0 <1.0.0", "@typespec/compiler": ">=0.60.0 <1.0.0",
"@typespec/http": ">=0.59.0 <1.0.0", "@typespec/http": ">=0.60.0 <1.0.0",
"@typespec/openapi": ">=0.59.0 <1.0.0", "@typespec/openapi": ">=0.60.0 <1.0.0",
"@typespec/rest": ">=0.59.0 <1.0.0", "@typespec/rest": ">=0.60.0 <1.0.0",
"@typespec/versioning": ">=0.59.0 <1.0.0", "@typespec/versioning": ">=0.60.0 <1.0.0",
"@typespec/xml": ">=0.59.0 <1.0.0" "@typespec/xml": ">=0.60.0 <1.0.0"
}, },
"dependencies": { "dependencies": {
"@autorest/codemodel": "~4.20.0", "@autorest/codemodel": "~4.20.0",
@ -59,26 +59,26 @@
"lodash": "~4.17.21" "lodash": "~4.17.21"
}, },
"devDependencies": { "devDependencies": {
"@azure-tools/typespec-autorest": "0.45.0", "@azure-tools/typespec-autorest": "0.46.0",
"@azure-tools/typespec-azure-core": "0.45.0", "@azure-tools/typespec-azure-core": "0.46.0",
"@azure-tools/typespec-azure-resource-manager": "0.45.0", "@azure-tools/typespec-azure-resource-manager": "0.46.0",
"@azure-tools/typespec-azure-rulesets": "0.45.0", "@azure-tools/typespec-azure-rulesets": "0.46.0",
"@azure-tools/typespec-client-generator-core": "0.45.4", "@azure-tools/typespec-client-generator-core": "0.46.0",
"@microsoft/api-extractor": "^7.40.3", "@microsoft/api-extractor": "^7.47.8",
"@microsoft/api-extractor-model": "^7.28.2", "@microsoft/api-extractor-model": "^7.29.7",
"@types/js-yaml": "~4.0.9", "@types/js-yaml": "~4.0.9",
"@types/lodash": "~4.17.1", "@types/lodash": "~4.17.7",
"@types/node": "~22.4.2", "@types/node": "~22.5.4",
"@typespec/compiler": "0.59.1", "@typespec/compiler": "0.60.0",
"@typespec/http": "0.59.1", "@typespec/http": "0.60.0",
"@typespec/openapi": "0.59.0", "@typespec/openapi": "0.60.0",
"@typespec/rest": "0.59.1", "@typespec/rest": "0.60.0",
"@typespec/versioning": "0.59.0", "@typespec/versioning": "0.60.0",
"@vitest/coverage-v8": "^1.4.0", "@vitest/coverage-v8": "^2.0.5",
"@vitest/ui": "^1.4.0", "@vitest/ui": "^2.0.5",
"c8": "~10.1.2", "c8": "~10.1.2",
"rimraf": "~6.0.1", "rimraf": "~6.0.1",
"typescript": "~5.5.4", "typescript": "~5.6.2",
"vitest": "^1.4.0" "vitest": "^2.0.5"
} }
} }