Skip to content
Open
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
2 changes: 1 addition & 1 deletion core
Submodule core updated 275 files
7 changes: 6 additions & 1 deletion typespec-extension/changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Release History

## 0.44.2 (2026-04-10)

Compatible with compiler 1.11.0.

- Supported `@clientRequired` client option.

## 0.44.1 (2026-04-10)

Compatible with compiler 1.11.0.

- Updated package dependencies to the latest versions.
- Supported `@clientRequired` client option.

## 0.44.0 (2026-04-08)

Expand Down
4 changes: 2 additions & 2 deletions typespec-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion typespec-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure-tools/typespec-java",
"version": "0.44.1",
"version": "0.44.2",
"description": "TypeSpec library for emitting Java client from the TypeSpec REST protocol binding",
"keywords": [
"TypeSpec"
Expand Down
2 changes: 1 addition & 1 deletion typespec-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@typespec/spector": "0.1.0-alpha.25",
"@typespec/http-specs": "0.1.0-alpha.36",
"@azure-tools/azure-http-specs": "0.1.0-alpha.39",
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.44.1.tgz"
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.44.2.tgz"
},
"devDependencies": {
"@typespec/prettier-plugin-typespec": "^1.11.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package tsptest.clientoption;

import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
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.util.BinaryData;
import com.azure.core.util.FluxUtil;
import reactor.core.publisher.Mono;
import tsptest.clientoption.implementation.ClientRequiredsImpl;
import tsptest.clientoption.models.ClientRequiredRequest;

/**
* Initializes a new instance of the asynchronous ClientOptionClient type.
*/
@ServiceClient(builder = ClientOptionClientBuilder.class, isAsync = true)
public final class ClientOptionAsyncClient {
@Generated
private final ClientRequiredsImpl serviceClient;

/**
* Initializes an instance of ClientOptionAsyncClient class.
*
* @param serviceClient the service client implementation.
*/
@Generated
ClientOptionAsyncClient(ClientRequiredsImpl serviceClient) {
this.serviceClient = serviceClient;
}

/**
* The post operation.
* <p><strong>Query Parameters</strong></p>
* <table border="1">
* <caption>Query Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>filter</td><td>String</td><td>No</td><td>The filter parameter</td></tr>
* </table>
* You can add these to a request with {@link RequestOptions#addQueryParam}
* <p><strong>Request Body Schema</strong></p>
*
* <pre>
* {@code
* {
* name: String (Required)
* timespan: Duration (Required)
* }
* }
* </pre>
*
* @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 the {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> postWithResponse(BinaryData body, RequestOptions requestOptions) {
return this.serviceClient.postWithResponseAsync(body, requestOptions);
}

/**
* The post operation.
*
* @param body The body parameter.
* @param filter The filter parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @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.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return A {@link Mono} that completes when a successful response is received.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> post(ClientRequiredRequest body, String filter) {
// Generated convenience method for postWithResponse
RequestOptions requestOptions = new RequestOptions();
if (filter != null) {
requestOptions.addQueryParam("filter", filter, false);
}
return postWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono);
}

/**
* The post operation.
*
* @param body The body parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @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.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return A {@link Mono} that completes when a successful response is received.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> post(ClientRequiredRequest body) {
// Generated convenience method for postWithResponse
RequestOptions requestOptions = new RequestOptions();
return postWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package tsptest.clientoption;

import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
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.util.BinaryData;
import tsptest.clientoption.implementation.ClientRequiredsImpl;
import tsptest.clientoption.models.ClientRequiredRequest;

/**
* Initializes a new instance of the synchronous ClientOptionClient type.
*/
@ServiceClient(builder = ClientOptionClientBuilder.class)
public final class ClientOptionClient {
@Generated
private final ClientRequiredsImpl serviceClient;

/**
* Initializes an instance of ClientOptionClient class.
*
* @param serviceClient the service client implementation.
*/
@Generated
ClientOptionClient(ClientRequiredsImpl serviceClient) {
this.serviceClient = serviceClient;
}

/**
* The post operation.
* <p><strong>Query Parameters</strong></p>
* <table border="1">
* <caption>Query Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>filter</td><td>String</td><td>No</td><td>The filter parameter</td></tr>
* </table>
* You can add these to a request with {@link RequestOptions#addQueryParam}
* <p><strong>Request Body Schema</strong></p>
*
* <pre>
* {@code
* {
* name: String (Required)
* timespan: Duration (Required)
* }
* }
* </pre>
*
* @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 the {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> postWithResponse(BinaryData body, RequestOptions requestOptions) {
return this.serviceClient.postWithResponse(body, requestOptions);
}

/**
* The post operation.
*
* @param body The body parameter.
* @param filter The filter parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @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.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public void post(ClientRequiredRequest body, String filter) {
// Generated convenience method for postWithResponse
RequestOptions requestOptions = new RequestOptions();
if (filter != null) {
requestOptions.addQueryParam("filter", filter, false);
}
postWithResponse(BinaryData.fromObject(body), requestOptions).getValue();
}

/**
* The post operation.
*
* @param body The body parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @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.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public void post(ClientRequiredRequest body) {
// Generated convenience method for postWithResponse
RequestOptions requestOptions = new RequestOptions();
postWithResponse(BinaryData.fromObject(body), requestOptions).getValue();
}
}
Loading
Loading