Skip to content

Regenerate Job Router with stream-style serialization and remove many Internal models#40397

Merged
williamzhao87 merged 5 commits intoAzure:mainfrom
alzimmermsft:AzComm_GenerateJobRouterWithSourceGenerator
Jun 5, 2024
Merged

Regenerate Job Router with stream-style serialization and remove many Internal models#40397
williamzhao87 merged 5 commits intoAzure:mainfrom
alzimmermsft:AzComm_GenerateJobRouterWithSourceGenerator

Conversation

@alzimmermsft
Copy link
Copy Markdown
Member

Description

Regenerates azure-communication-jobrouter with stream-style serialization enabled. Additionally, adds numerous code customizations so that the *Internal model mapping pattern can be reduced greatly, lowering maintenance costs and possible bugs when mapping handwritten models to generated models.

There will need to be a corresponding change in azure-rest-api-specs based on what I changed manually in models.tsp and tspconfig.yml while creating this PR. I will open that PR once this has approval.

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.

@azure-sdk
Copy link
Copy Markdown
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

com.azure:azure-communication-jobrouter

@alzimmermsft alzimmermsft marked this pull request as ready for review May 30, 2024 19:55
@alzimmermsft
Copy link
Copy Markdown
Member Author

@williamzhao87 could you take a look at this PR. It's onboarding Job Router to azure-json and using code customizations to remove a lot of the mapping logic from custom to generated types but having the generated types handle the same as the custom types.

@williamzhao87
Copy link
Copy Markdown
Contributor

@alzimmermsft Thanks for submitting the PR with these extensive changes! Everything here looks good to me.

@williamzhao87 williamzhao87 merged commit 0a1712a into Azure:main Jun 5, 2024
*/
@Immutable
public final class CancelJobResultInternal {
public final class CancelJobResultInternal implements JsonSerializable<CancelJobResultInternal> {
Copy link
Copy Markdown
Contributor

@williamzhao87 williamzhao87 Jun 5, 2024

Choose a reason for hiding this comment

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

Just curious, it's only the empty internal classes that cannot be removed, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I really never figured out what to do with this class and the similar Internal classes as they're defined in the TypeSpec without any properties but are used in service methods that are hidden from the public API, so I left them. These can be followed up on if they should be removed.

@alzimmermsft alzimmermsft deleted the AzComm_GenerateJobRouterWithSourceGenerator branch June 5, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants