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

feat(dpg): support logicalPath of lro #3839

Merged
merged 14 commits into from
Oct 26, 2023

Conversation

archerzz
Copy link
Member

Description

  • pass in logicalPath info from emitter
  • in generator, generate convert lambda to fetch the return value from logicalPath
  • add test case

resolve #3837

Checklist

To ensure a quick review and merge, please ensure:

  • The PR has a understandable title and description explaining the why and what.
  • The PR is opened in draft if not ready for review yet.
    • If opened in draft, please allocate sufficient time (24 hours) after moving out of draft for review
  • The branch is recent enough to not have merge conflicts upon creation.

Ready to Land?

  • Build is completely green
    • Submissions with test failures require tracking issue and approval of a CODEOWNER
  • At least one +1 review by a CODEOWNER
  • All -1 reviews are confirmed resolved by the reviewer
    • Override/Marking reviews stale must be discussed with CODEOWNERS first

# Conflicts:
#	src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts

- pass in `logicalPath` info from emitter
- in generator, generate convert lambda to fetch the return value from `logicalPath`
- add test case

resolve Azure#3837
@archerzz
Copy link
Member Author

Regen preview: Azure/azure-sdk-for-net#39323

It also rolls back the workaround for OpenAI: Azure/azure-sdk-for-net@046ae62 (#39323)

@archerzz
Copy link
Member Author

archerzz commented Oct 18, 2023

List of changes since last review:

  • Move ReturnType and ResultPath from OperationResponse to OperationLongRunning.
  • Use System.Text.Json to fetch the result JSON data, instead of using raw response model to deserialize.
  • adopt feature/v3 changes

Updated regen preview: Azure/azure-sdk-for-net#39351 The same as the previous one.

@archerzz
Copy link
Member Author

Changes since last review:

  • return FormattableString to keep type deduction
  • extract conversion lambda expression into separate methods

Regen preview: Azure/azure-sdk-for-net#39389

@archerzz
Copy link
Member Author

Changes since last review:

  • fix typo and add todo
  • reverse null check for better readability
  • merge feature/v3

Preview PR: Azure/azure-sdk-for-net#39439

@archerzz archerzz enabled auto-merge (squash) October 26, 2023 09:20
@archerzz archerzz merged commit 0a56abd into Azure:feature/v3 Oct 26, 2023
7 checks passed
live1206 pushed a commit to live1206/autorest.csharp that referenced this pull request Dec 11, 2023
- pass in `logicalPath` info from emitter
- in generator, generate conversion method to fetch the return value from `logicalPath`
- add test case

resolve Azure#3837

---------

Co-authored-by: Mingzhe Huang (from Dev Box) <mingzhehuang@microsoft.com>
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.

Need to handle the deserialization if we use getLroMetadata.LogicalResult
4 participants