feat(dpg): initial support of lro#3810
Merged
m-nash merged 22 commits intoAzure:feature/v3from Oct 13, 2023
Merged
Conversation
- adopt `getLroMetadata` from `@azure-tools/typespec-azure-core` instead of fetching lro metadata by ourselves - add `cadl-ranch` test cases of `lro/standard`, but disable the case of model property - disable test case of `LongRunningResourceCreateWithServiceProvidedName` which is blocked by a defect in `typespec-azure` - in code generator, for dpg, use final response as the return type of the generated methods - minor refactoring and cleanup
# Conflicts: # src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs # test/TestProjects/Authoring-TypeSpec/src/Generated/AuthoringTypeSpecClient.cs # test/TestProjects/Authoring-TypeSpec/src/Generated/Docs/AuthoringTypeSpecClient.xml # test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json # test/TestProjects/Authoring-TypeSpec/tests/Generated/Samples/Samples_AuthoringTypeSpecClient.cs # test/TestProjects/Lro-Basic-TypeSpec/src/Generated/LroBasicTypeSpecClient.cs
- remove `Lro-Basic-TypeSpec` which can be replaced by cadl-ranch tests - add `lro/rpc/legacy` tests from cadl-ranch
- rename namespace to avoid `Azure.Core` which mess up Roslyn code simplification - add leading `_` to `Azure` to avoid generator scaffolding logic to create test projects as Azure SDK projects
# Conflicts: # src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs # test/CadlRanchProjects/azure/core/lro/standard/src/Generated/StandardClient.cs # test/TestProjects/Authoring-TypeSpec/src/Generated/Docs/AuthoringTypeSpecClient.xml # test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json # test/TestProjects/Authoring-TypeSpec/tests/Generated/Samples/Samples_AuthoringTypeSpecClient.cs # test/TestProjects/Lro-Basic-TypeSpec/Lro-Basic-TypeSpec.tsp # test/TestProjects/Lro-Basic-TypeSpec/src/Generated/Docs/LroBasicTypeSpecClient.xml # test/TestProjects/Lro-Basic-TypeSpec/src/Generated/tspCodeModel.json # test/TestProjects/Lro-Basic-TypeSpec/tests/Generated/Samples/Samples_LroBasicTypeSpecClient.cs
# Conflicts: # test/CadlRanchProjects/azure/core/lro/standard/src/Generated/StandardClient.cs # test/TestProjects/Authoring-TypeSpec/src/Generated/Docs/AuthoringTypeSpecClient.xml # test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json # test/TestProjects/Authoring-TypeSpec/tests/Generated/Samples/Samples_AuthoringTypeSpecClient.cs # test/TestProjects/Lro-Basic-TypeSpec/src/Generated/Docs/LroBasicTypeSpecClient.xml # test/TestProjects/Lro-Basic-TypeSpec/tests/Generated/Samples/Samples_LroBasicTypeSpecClient.cs
5668b59 to
4bf1b1f
Compare
4bf1b1f to
fb0459a
Compare
8d77dcd to
0a31dd1
Compare
m-nash
approved these changes
Oct 13, 2023
live1206
pushed a commit
to live1206/autorest.csharp
that referenced
this pull request
Dec 11, 2023
* feat(dpg): initial support of lro - adopt `getLroMetadata` from `@azure-tools/typespec-azure-core` instead of fetching lro metadata by ourselves - add `cadl-ranch` test cases of `lro/standard`, but disable the case of model property - disable test case of `LongRunningResourceCreateWithServiceProvidedName` which is blocked by a defect in `typespec-azure` - in code generator, for dpg, use final response as the return type of the generated methods - minor refactoring and cleanup * add unit test * update test cases - remove `Lro-Basic-TypeSpec` which can be replaced by cadl-ranch tests - add `lro/rpc/legacy` tests from cadl-ranch * fix errors in cadl ranch lro test projects - rename namespace to avoid `Azure.Core` which mess up Roslyn code simplification - add leading `_` to `Azure` to avoid generator scaffolding logic to create test projects as Azure SDK projects * fix test cases * regen * add custom-link and custom-operation-reference as final state via * use `envelopResult` to keep existing behavior (maybe temporarily) * regen after merge * update to use logical result * update authoring * regen unit tests --------- Co-authored-by: Mingzhe Huang (from Dev Box) <mingzhehuang@microsoft.com> Co-authored-by: m-nash <prognash@gmail.com>
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 free
to 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.
Description
getLroMetadatafrom@azure-tools/typespec-azure-coreinstead of fetching lro metadata by ourselvescadl-ranchtest cases:lro/standard: but disable the case of model propertylro/rpg-legancyLroBasic-TypeSpecwhich can be covered bycadl-ranchtest casesresolve #2988
Checklist
To ensure a quick review and merge, please ensure:
Ready to Land?
getLroMetadatafrom@azure-tools/typespec-azure-coreinstead of fetching lro metadata by ourselvescadl-ranchtest cases oflro/standard, but disable the case of model propertyLongRunningResourceCreateWithServiceProvidedNamewhich is blocked by a defect intypespec-azure