-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Automation] Generate SDK based on TypeSpec 0.15.12 #39812
Merged
haolingdong-msft
merged 1 commit into
Azure:main
from
azure-sdk:typespec-java-generation-3712988
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"main": "dist/src/index.js", | ||
"dependencies": { | ||
"@azure-tools/typespec-java": "0.15.10" | ||
"@azure-tools/typespec-java": "0.15.12" | ||
}, | ||
"devDependencies": { | ||
"@azure-tools/typespec-client-generator-core": "0.41.2", | ||
"@typespec/openapi": "0.55.0", | ||
"@typespec/rest": "0.55.0", | ||
"@typespec/compiler": "0.55.0", | ||
"@typespec/versioning": "0.55.0", | ||
"@azure-tools/typespec-azure-core": "0.41.0", | ||
"@typespec/http": "0.55.0", | ||
"@typespec/compiler": "0.55.0", | ||
"@typespec/openapi": "0.55.0", | ||
"@typespec/versioning": "0.55.0" | ||
"@azure-tools/typespec-client-generator-core": "0.41.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...mespaces/src/main/java/com/azure/messaging/eventgrid/namespaces/models/PublishResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
// Code generated by Microsoft (R) TypeSpec Code Generator. | ||
package com.azure.messaging.eventgrid.namespaces.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 result of the Publish operation. | ||
*/ | ||
@Immutable | ||
public final class PublishResult implements JsonSerializable<PublishResult> { | ||
|
||
/** | ||
* Creates an instance of PublishResult class. | ||
*/ | ||
@Generated | ||
private PublishResult() { | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Generated | ||
@Override | ||
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { | ||
jsonWriter.writeStartObject(); | ||
return jsonWriter.writeEndObject(); | ||
} | ||
|
||
/** | ||
* Reads an instance of PublishResult from the JsonReader. | ||
* | ||
* @param jsonReader The JsonReader being read. | ||
* @return An instance of PublishResult if the JsonReader was pointing to an instance of it, or null if it was | ||
* pointing to JSON null. | ||
* @throws IOException If an error occurs while reading the PublishResult. | ||
*/ | ||
@Generated | ||
public static PublishResult fromJson(JsonReader jsonReader) throws IOException { | ||
return jsonReader.readObject(reader -> { | ||
PublishResult deserializedPublishResult = new PublishResult(); | ||
while (reader.nextToken() != JsonToken.END_OBJECT) { | ||
String fieldName = reader.getFieldName(); | ||
reader.nextToken(); | ||
reader.skipChildren(); | ||
} | ||
return deserializedPublishResult; | ||
}); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
.../src/main/resources/META-INF/azure-messaging-eventgrid-namespaces_apiview_properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"flavor": "azure", | ||
"CrossLanguageDefinitionId": { | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient": "Microsoft.EventGrid.EventGridClient", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.acknowledgeCloudEvents": "Microsoft.EventGrid.acknowledgeCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.acknowledgeCloudEventsWithResponse": "Microsoft.EventGrid.acknowledgeCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.publishCloudEvent": "Microsoft.EventGrid.publishCloudEvent", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.publishCloudEventWithResponse": "Microsoft.EventGrid.publishCloudEvent", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.publishCloudEvents": "Microsoft.EventGrid.publishCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.publishCloudEventsWithResponse": "Microsoft.EventGrid.publishCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.receiveCloudEvents": "Microsoft.EventGrid.receiveCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.receiveCloudEventsWithResponse": "Microsoft.EventGrid.receiveCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.rejectCloudEvents": "Microsoft.EventGrid.rejectCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.rejectCloudEventsWithResponse": "Microsoft.EventGrid.rejectCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.releaseCloudEvents": "Microsoft.EventGrid.releaseCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.releaseCloudEventsWithResponse": "Microsoft.EventGrid.releaseCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.renewCloudEventLocks": "Microsoft.EventGrid.renewCloudEventLocks", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridAsyncClient.renewCloudEventLocksWithResponse": "Microsoft.EventGrid.renewCloudEventLocks", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient": "Microsoft.EventGrid.EventGridClient", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.acknowledgeCloudEvents": "Microsoft.EventGrid.acknowledgeCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.acknowledgeCloudEventsWithResponse": "Microsoft.EventGrid.acknowledgeCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.publishCloudEvent": "Microsoft.EventGrid.publishCloudEvent", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.publishCloudEventWithResponse": "Microsoft.EventGrid.publishCloudEvent", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.publishCloudEvents": "Microsoft.EventGrid.publishCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.publishCloudEventsWithResponse": "Microsoft.EventGrid.publishCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.receiveCloudEvents": "Microsoft.EventGrid.receiveCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.receiveCloudEventsWithResponse": "Microsoft.EventGrid.receiveCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.rejectCloudEvents": "Microsoft.EventGrid.rejectCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.rejectCloudEventsWithResponse": "Microsoft.EventGrid.rejectCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.releaseCloudEvents": "Microsoft.EventGrid.releaseCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.releaseCloudEventsWithResponse": "Microsoft.EventGrid.releaseCloudEvents", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.renewCloudEventLocks": "Microsoft.EventGrid.renewCloudEventLocks", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClient.renewCloudEventLocksWithResponse": "Microsoft.EventGrid.renewCloudEventLocks", | ||
"com.azure.messaging.eventgrid.namespaces.EventGridClientBuilder": "Microsoft.EventGrid.EventGridClient", | ||
"com.azure.messaging.eventgrid.namespaces.implementation.models.CloudEvent": "Microsoft.EventGrid.CloudEvent", | ||
"com.azure.messaging.eventgrid.namespaces.models.AcknowledgeOptions": "Microsoft.EventGrid.AcknowledgeOptions", | ||
"com.azure.messaging.eventgrid.namespaces.models.AcknowledgeResult": "Microsoft.EventGrid.AcknowledgeResult", | ||
"com.azure.messaging.eventgrid.namespaces.models.BrokerProperties": "Microsoft.EventGrid.BrokerProperties", | ||
"com.azure.messaging.eventgrid.namespaces.models.FailedLockToken": "Microsoft.EventGrid.FailedLockToken", | ||
"com.azure.messaging.eventgrid.namespaces.models.PublishResult": "Microsoft.EventGrid.PublishResult", | ||
"com.azure.messaging.eventgrid.namespaces.models.ReceiveDetails": "Microsoft.EventGrid.ReceiveDetails", | ||
"com.azure.messaging.eventgrid.namespaces.models.ReceiveResult": "Microsoft.EventGrid.ReceiveResult", | ||
"com.azure.messaging.eventgrid.namespaces.models.RejectOptions": "Microsoft.EventGrid.RejectOptions", | ||
"com.azure.messaging.eventgrid.namespaces.models.RejectResult": "Microsoft.EventGrid.RejectResult", | ||
"com.azure.messaging.eventgrid.namespaces.models.ReleaseDelay": "Microsoft.EventGrid.ReleaseDelay", | ||
"com.azure.messaging.eventgrid.namespaces.models.ReleaseOptions": "Microsoft.EventGrid.ReleaseOptions", | ||
"com.azure.messaging.eventgrid.namespaces.models.ReleaseResult": "Microsoft.EventGrid.ReleaseResult", | ||
"com.azure.messaging.eventgrid.namespaces.models.RenewCloudEventLocksResult": "Microsoft.EventGrid.RenewCloudEventLocksResult", | ||
"com.azure.messaging.eventgrid.namespaces.models.RenewLockOptions": "Microsoft.EventGrid.RenewLockOptions" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The model is from operation
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L239-L253
Please log an issue in autorest.java about why the Client method is
public void publishCloudEvent(String topicName, CloudEvent event)
, instead ofpublic PublishResult publishCloudEvent(String topicName, CloudEvent event)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, no. They've customized the Client method.
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/eventgrid/azure-messaging-eventgrid-namespaces/src/main/java/com/azure/messaging/eventgrid/namespaces/EventGridClient.java#L474-L477
We probably just go notify them of the change, and see if they want to remove this class in customization. e.g. https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/openai/azure-ai-openai/customization/src/main/java/ChatCompletionsToolCallCustomizations.java#L59