tsp, tcgc, adopt sdkpackage#2861
Conversation
# Conflicts: # typespec-extension/src/code-model-builder.ts
# Conflicts: # typespec-extension/src/code-model-builder.ts # typespec-tests/src/main/java/com/cadl/internal/InternalAsyncClient.java # typespec-tests/src/main/java/com/cadl/internal/InternalClient.java # typespec-tests/src/main/java/com/cadl/internal/implementation/InternalOpsImpl.java # typespec-tests/src/main/java/com/cadl/literalservice/implementation/LiteralOpsImpl.java # typespec-tests/src/main/java/com/cadl/longrunning/implementation/LongRunningClientImpl.java # typespec-tests/src/main/java/com/cadl/naming/NamingAsyncClient.java # typespec-tests/src/main/java/com/cadl/naming/NamingClient.java # typespec-tests/src/main/java/com/cadl/naming/implementation/NamingOpsImpl.java # typespec-tests/src/main/java/com/cadl/optional/OptionalAsyncClient.java # typespec-tests/src/main/java/com/cadl/optional/OptionalClient.java # typespec-tests/src/main/java/com/cadl/optional/implementation/OptionalOpsImpl.java # typespec-tests/src/main/java/com/cadl/wiretype/implementation/WireTypeOpsImpl.java
This reverts commit 07a773f. # Conflicts: # typespec-tests/src/main/java/com/cadl/internal/InternalAsyncClient.java # typespec-tests/src/main/java/com/cadl/internal/InternalClient.java # typespec-tests/src/main/java/com/cadl/internal/implementation/InternalOpsImpl.java # typespec-tests/src/main/java/com/cadl/literalservice/implementation/LiteralOpsImpl.java # typespec-tests/src/main/java/com/cadl/longrunning/implementation/LongRunningClientImpl.java # typespec-tests/src/main/java/com/cadl/naming/NamingAsyncClient.java # typespec-tests/src/main/java/com/cadl/naming/NamingClient.java # typespec-tests/src/main/java/com/cadl/naming/implementation/NamingOpsImpl.java # typespec-tests/src/main/java/com/cadl/optional/OptionalAsyncClient.java # typespec-tests/src/main/java/com/cadl/optional/OptionalClient.java # typespec-tests/src/main/java/com/cadl/optional/implementation/OptionalOpsImpl.java # typespec-tests/src/main/java/com/cadl/wiretype/implementation/WireTypeOpsImpl.java # typespec-tests/src/samples/java/com/cadl/flatten/generated/FlattenOpSend.java
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
# Conflicts: # typespec-extension/src/code-model-builder.ts
# Conflicts: # typespec-extension/src/code-model-builder.ts
# Conflicts: # typespec-extension/src/code-model-builder.ts
.../java/com/_specs_/azure/clientgenerator/core/usage/implementation/ModelInOperationsImpl.java
Outdated
Show resolved
Hide resolved
typespec-tests/src/main/java/com/_specs_/azure/core/basic/BasicAsyncClient.java
Show resolved
Hide resolved
...ests/src/main/java/com/_specs_/azure/core/basic/implementation/TwoModelsAsPageItemsImpl.java
Show resolved
Hide resolved
# Conflicts: # typespec-tests/src/main/java/com/cadl/armresourceprovider/implementation/ChildResourcesInterfacesClientImpl.java
|
Then what's this line for?
|
it is property of the body model. autorest.java/typespec-extension/src/code-model-builder.ts Lines 1360 to 1373 in 0026417 |
Yes, I think it is not needed in your code. And that is the reason I am verifying whether TCGC gives you the "property" type parameter. Also, from this code, the order of parameters of "spread" op is not what TCGC gives you. It is by your code, that non-property parameter is processed, then the property of the The order in TCGC on this would be in its I likely going to refactor and use |
No, it is not same as |
There was a problem hiding this comment.
Mostly LGTM
- please check the "if" branch, seems to see some extra
__rawcheck that seems not used in the code block - there is some new
collectionFormatfrom TCGC #2861 (comment)
You can use 0.20.0 for next version
# Conflicts: # typespec-extension/changelog.md # typespec-extension/package.json # typespec-extension/src/code-model-builder.ts # typespec-tests/package.json
| */ | ||
| private isArmSynthesizedServer(server: HttpServer): boolean { | ||
| return this.isArm() && (!server.parameters || server.parameters.size == 0); | ||
| .filter((version) => !excludePreview || pinnedApiVersion.includes("preview") || !version.includes("preview")); |
There was a problem hiding this comment.
Yeah, we should use isStable to not duplicate the logic of checking for -preview string and also should be case insensitive.
Link #2665
WIP, have not cleaned up code in emitter yet, will let you know once it's done. But would like to create PR to track generated code diff. I'm checking the diffs generated impl files. Especially on
acceptandcontent-typeheaders, as well as descriptions.Latest API view and diff summary: #2665 (comment)
-------- update on 8/7----------------
api view and diff summary: #2665 (comment)
I have also done a round of code clean up. If you have time, please feel free to take a look in the meanwhile I'm fixing the two diffs.
--------update on 8/9--------------------
Note that after adopting new
SdkclientTypedesign, those previously constant endpoint would be overridable, so there are diffs generated: 955620e---------update on 8/12---------------------
new api-view: https://apiview.dev/Assemblies/Review/e0cf256f814e456bac0f0d751bd4aa9f/e0f4e0c3e4704de89332b6229b14ad64?diffRevisionId=fbdae726b3a04e839587766478ca88eb&diffOnly=true
Diff summary in the issue: #2665 (comment)
-----------8/13 update------
latest api view: https://apiview.dev/Assemblies/Review/e0cf256f814e456bac0f0d751bd4aa9f/0e83c8742b5942379d330f0e8f40b667?diffRevisionId=af2d36f4bf4243a39d2cab13ace75d25&diffOnly=true
public API diff:
impl diff:
allowReservedon path not supoprted by TCGC.--------------------update on 8/19----------------------
API view:
https://apiview.dev/Assemblies/Review/e0cf256f814e456bac0f0d751bd4aa9f/b6c1bc44f2a64d90bd19587aab003913?diffRevisionId=1eed99f40d2d46f0a66d7184e26c5d86&diffOnly=true
API view diff
Reason: There is limitation on
parameterslist ofSdkServiceMethodthat it cannot map to correspondingSdkHttpOperation'sparameters/bodyTypewhich causes we can't use theSdkServiceMethod.parameters. TCGC is considering adding a mapping for us to map SdkServiceMethod's parameters toSdkHttpOperation'sparametersandbodyType. But before it is supported, we are now usingSdkServiceMethod.SdkHttpOperation.For spread parameters, we will process the
parametersandbodyTypeunderSdkHttpOperation. So the order is firstquery/header/pathparameters, thenbodyparameter.Notable changes comparing to last version:
allowReservedin path: a423afa