-
Notifications
You must be signed in to change notification settings - Fork 215
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
http-client-java, adopt TCGC usage and access #4854
base: main
Are you sure you want to change the base?
http-client-java, adopt TCGC usage and access #4854
Conversation
…t-tcgc-access-usage # Conflicts: # packages/http-client-java/emitter/src/code-model-builder.ts
…t-tcgc-access-usage # Conflicts: # packages/http-client-java/emitter/src/code-model-builder.ts
…t-tcgc-access-usage
# Conflicts: # packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/enumservice/models/Operation.java
…t-tcgc-access-usage # Conflicts: # packages/http-client-java/emitter/src/type-utils.ts
…t-tcgc-access-usage
No changes needing a change description found. |
You can try these changes here
|
/** | ||
* Repeatability Result header options. | ||
*/ | ||
public enum RepeatabilityResult { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caused by this case1
/** | ||
* Enum describing allowed operation states. | ||
*/ | ||
public final class OperationState extends ExpandableStringEnum<OperationState> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -150,7 +150,7 @@ public final class Builtin implements JsonSerializable<Builtin> { | |||
* @param encoded the encoded value to set. | |||
*/ | |||
@Generated | |||
public Builtin(boolean booleanProperty, String string, byte[] bytes, int intProperty, long safeint, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is expected as Builltin
and Encoded
are used in operation whose convenientAPI == false
@@ -63,7 +63,7 @@ enum OperationStateValues { | |||
Failed, | |||
} | |||
|
|||
@usage(Usage.input) | |||
@usage(Usage.input | Usage.output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update the test case as the definition is invalid.
* The LroOperationStatusError model. | ||
*/ | ||
@Immutable | ||
public final class LroOperationStatusError implements JsonSerializable<LroOperationStatusError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caused by case3
import com.cadl.multicontenttypes.implementation.MultipleContentTypesOnRequestsImpl; | ||
import com.cadl.multicontenttypes.models.Resource; | ||
import reactor.core.publisher.Mono; | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caused by case7
@@ -71,6 +73,7 @@ interface MultipleContentTypesOnRequest { | |||
@route("upload/multi-body-types") | |||
@sharedRoute | |||
@post | |||
@convenientAPI(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cause by case7. We agree to add @convenientAPI(false)
to the operation.
@@ -92,8 +90,6 @@ public Mono<Response<Void>> uploadBytesWithSingleBodyTypeForMultiContentTypesWit | |||
@ServiceMethod(returns = ReturnType.SINGLE) | |||
public Mono<Response<Void>> uploadBytesWithMultiBodyTypesForMultiContentTypesWithResponse(String contentType, | |||
BinaryData data, RequestOptions requestOptions) { | |||
// Convenience API is not generated, as operation 'uploadBytesWithMultiBodyTypesForMultiContentTypes' is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working on the javadoc and error message when user does not set convenientAPI(false)
...ttp-client-generator-test/src/main/java/com/cadl/protocolandconvenient/models/ResourceD.java
Show resolved
Hide resolved
...ttp-client-generator-test/src/main/java/com/cadl/protocolandconvenient/models/ResourceH.java
Show resolved
Hide resolved
|
||
/** | ||
* The actual serialized value for a RepeatabilityResult instance. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caused by case1
@@ -0,0 +1,150 @@ | |||
// Copyright (c) Microsoft Corporation. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caused by case2
*/ | ||
public final class OperationState extends ExpandableStringEnum<OperationState> { | ||
/** | ||
* The operation has not started. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caused by case2
/** | ||
* Defines values for ClientType. | ||
*/ | ||
public enum ClientType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caused by case8
/** | ||
* Enum value accepted. | ||
*/ | ||
ACCEPTED("accepted"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caused by case1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caused by case3
@@ -997,7 +1001,6 @@ export class CodeModelBuilder { | |||
} | |||
} | |||
|
|||
// track usage | |||
if (pollingSchema) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not remove this part because of this TCGC issue: Azure/typespec-azure#1752
PR shows the diff cases after adopting TCGC and summarized the cause of each diff.
WIP on emitter part, so no need to review yet.
TCGC dependencies are tracked in this issue: Azure/autorest.java#2931