-
Notifications
You must be signed in to change notification settings - Fork 283
http-client-java, escape javadoc for \u #7663
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
base: main
Are you sure you want to change the base?
http-client-java, escape javadoc for \u #7663
Conversation
No changes needing a change description found. |
You can try these changes here
|
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.
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
domainUsername
in the TSP schema and propagates it through the generated model, serializers, and client docs. - Implements
CodeNamer.escapeIllegalUnicodeEscape
to catch invalid\u
sequences 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
domainUsername
property onDataResponse
(including null and special characters) to prevent regressions.
jsonWriter.writeStringField("domainUsername", this.domainUsername);
fix Azure/autorest.java#3005