Skip to content
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

Generate SDK based on TypeSpec 0.15.6 (with stream-style-serialization=false to some lib) #39287

Merged
merged 24 commits into from
Apr 3, 2024

Conversation

weidongxu-microsoft
Copy link
Member

@weidongxu-microsoft weidongxu-microsoft commented Mar 19, 2024

fix Azure/autorest.java#2662

spec PR Azure/azure-rest-api-specs#28305 -- disabled stream-style-serialization for 6 libs

include migrate to stream-style-serialization for 4 libs:

  • azure-ai-contentsafety
  • azure-developer-devcenter
  • azure-ai-documentintelligence
  • azure-analytics-purview-datamap

skip openai
skip easm
Will create separate task for them (either update to latest typespec, or try migrate to stream-style-serialization which need a new test recording)

Link #38569


apiview for contentsafety

#39287 (comment)

diff

API added TextBlocklist createOrUpdateTextBlocklist(String name, TextBlocklist options).
It is JSON Merge Patch API that is supported under stream-style-serialization.

@zhaiyutong Please take a review. I may need your help to run the live test (or help me with the env that runs it) and a follow-up release.


apiview for communication-messages

https://apiview.dev/Assemblies/Review/6562e5ee918f497cba32cbf009b4de95/e81ad5b30e934034b274badd1404e691?diffRevisionId=beebd3ccefc94828975b409514c235c6&doc=False&diffOnly=True

This module is not migrated to stream-style-serialization.
These added "Kind" classes corresponds to the discriminator properties.

@arifibrahim4 Please take a review.

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@weidongxu-microsoft weidongxu-microsoft changed the title temporary point commitId to PR head Generate SDK based on TypeSpec 0.15.3 (with stream-style-serialization=false to some lib) Mar 19, 2024
@weidongxu-microsoft
Copy link
Member Author

weidongxu-microsoft commented Mar 19, 2024

One major issue is from text-translation
Azure/autorest.java#2629

(if this is the only remaining block, I would change it to stream-style-serialization=false)

@weidongxu-microsoft weidongxu-microsoft changed the title Generate SDK based on TypeSpec 0.15.3 (with stream-style-serialization=false to some lib) Generate SDK based on TypeSpec 0.15.4 (with stream-style-serialization=false to some lib) Mar 26, 2024
* default scoring formula that uses the number of job labels that the worker labels match, as well as the number
* of label selectors the worker labels match and/or exceed using a logistic function
* (https://en.wikipedia.org/wiki/Logistic_function).
* Define a scoring rule to use, when calculating a score to determine the best worker. If not set, will use a default scoring formula that uses the number of job labels that the worker labels match, as well as the number of label selectors the worker labels match and/or exceed using a logistic function (https://en.wikipedia.org/wiki/Logistic_function).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems Javadoc formatting broke?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does checkstyle no longer check char per line on Javadoc/comment?

I thought previously checkstyle would fail if line over 120 (exclude a few exceptions that line break not possible).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should, but I'll need to check if there is a suppression that is including too much to be skipped.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the line wrap on Javadoc comment works on the new release 0.15.6.

Here is just comment, and line wrap not taking effect.

Comment on lines +43 to +46
import com.azure.core.credential.KeyCredential;
import com.azure.core.credential.TokenCredential;
import java.net.MalformedURLException;
import java.net.URL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, something seems off with formatting. I'll take a look into why this is happening

Copy link
Member Author

@weidongxu-microsoft weidongxu-microsoft Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it the order of the "import"?

I guess part of it is via partial-update, when java-parser merge the imports from existing file and imports from generate file.

The part on formatting seems that it no longer order the imports.

@weidongxu-microsoft weidongxu-microsoft changed the title Generate SDK based on TypeSpec 0.15.4 (with stream-style-serialization=false to some lib) Generate SDK based on TypeSpec 0.15.5 (with stream-style-serialization=false to some lib) Mar 27, 2024
Comment on lines +410 to 423
{
"ignore": true,
"code": "java.annotation.removed",
"package": "com.azure.ai.contentsafety.models",
"annotationType": "com.fasterxml.jackson.annotation.JsonProperty",
"justification": "Migrate to azure-json."
},
{
"ignore": true,
"code": "java.annotation.removed",
"package": "com.azure.ai.contentsafety.models",
"annotationType": "com.fasterxml.jackson.annotation.JsonCreator",
"justification": "Migrate to azure-json."
}
Copy link
Member Author

@weidongxu-microsoft weidongxu-microsoft Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suppress revapi on removal of Jackson annotations, currently only for contentsafety -- the GA lib.

@weidongxu-microsoft weidongxu-microsoft changed the title Generate SDK based on TypeSpec 0.15.5 (with stream-style-serialization=false to some lib) Generate SDK based on TypeSpec 0.15.6 (with stream-style-serialization=false to some lib) Mar 28, 2024
@weidongxu-microsoft weidongxu-microsoft marked this pull request as ready for review March 28, 2024 07:01
@weidongxu-microsoft weidongxu-microsoft self-assigned this Apr 2, 2024
@weidongxu-microsoft weidongxu-microsoft merged commit f7efe80 into main Apr 3, 2024
141 checks passed
@weidongxu-microsoft weidongxu-microsoft deleted the dpg_sync-0.15.3 branch April 3, 2024 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Java Emitter with the TypeSpec April Release
4 participants