Uh oh!
There was an error while loading. Please reload this page.
http-client-java, escape javadoc for \u - #7663
Merged
Weidong Xu (weidongxu-microsoft) merged 4 commits intoJun 20, 2025
Merged
Conversation
Contributor
No changes needing a change description found. |
Azure SDK Bot (azure-sdk)
commented
Jun 17, 2025
Collaborator
You can try these changes here
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds support for a new domainUsername property in the Java HTTP client model and ensures that backslash-unicode sequences in Javadoc are correctly escaped.
- Introduces
domainUsernamein the TSP schema and propagates it through the generated model, serializers, and client docs. - Implements
CodeNamer.escapeIllegalUnicodeEscapeto catch invalid\usequences and plugs it into line and Javadoc comment generation. - Adds unit tests for the new escape logic in
CodeNamerTests.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| naming.tsp | Defined a new domainUsername property with a backslash in its doc string. |
| DataResponse.java | Added domainUsername field, constructor parameter, getter, and JSON (de)serialization handling. |
| NamingOpsImpl.java | Updated operation documentation to include domainUsername. |
| NamingAsyncClient.java | Updated async client Javadoc to include domainUsername. |
| CodeNamerTests.java | Added tests for escapeIllegalUnicodeEscape. |
| CodeNamer.java | Implemented escapeIllegalUnicodeEscape and factored out newStringBuilder. |
| JavaLineComment.java | Plugged escapeIllegalUnicodeEscape into line comments. |
| JavaJavadocComment.java | Plugged escapeIllegalUnicodeEscape into Javadoc comments. |
Comments suppressed due to low confidence (1)
packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/naming/models/DataResponse.java:166
- Add unit tests to verify serialization and deserialization of the new
domainUsernameproperty onDataResponse(including null and special characters) to prevent regressions.
jsonWriter.writeStringField("domainUsername", this.domainUsername);
Weidong Xu (weidongxu-microsoft)
marked this pull request as ready for review
June 17, 2025 06:26
Haoling Dong (haolingdong-msft)
approved these changes
Jun 17, 2025
Weidong Xu (weidongxu-microsoft)
requested a review
from Alan Zimmer (alzimmermsft)June 17, 2025 08:19
Alan Zimmer (alzimmermsft)
approved these changes
Jun 18, 2025
Uh oh!
There was an error while loading. Please reload this page.
Weidong Xu (weidongxu-microsoft)
deleted the
http-client-java_escape-javadoc
branch
June 20, 2025 02:44
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fixAzure/autorest.java#3005