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

http-client-java, emitter, TCGC integration, deprecate TCGC's description and details #4394

Closed
Tracked by #2931
haolingdong-msft opened this issue Sep 11, 2024 · 0 comments · Fixed by #4529
Closed
Tracked by #2931
Assignees
Labels
emitter:client:java Issue for the Java client emitter: @typespec/http-client-java

Comments

@haolingdong-msft
Copy link
Member

TCGC now deprecates description and detail, and return typespec description and summary instead.
We should change back to use description and summary.

Refer to Azure/typespec-azure#1235 for more details.

@haolingdong-msft haolingdong-msft added the emitter:client:java Issue for the Java client emitter: @typespec/http-client-java label Sep 11, 2024
@haolingdong-msft haolingdong-msft self-assigned this Sep 11, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 26, 2024
Fix #4394

Code changes: 
1. deprecate `description` and `details`, use `doc` and `summary`
instead.
2. add `npm run lint` in `Build-Packages.ps1`. So that deprecation
warning will be thrown.


I quickly checked the generation diff. The generation diffs are in cases
where the operation uses tsp template, previously, the `description`
will get tempalte's doc, but now `doc` or `summary` will not. **It only
impacts impl classes**. I think it is acceptable.
eg.,
[code](https://github.com/microsoft/typespec/pull/4529/files#diff-71f0d715f644a82637d8db144d6d3a999b65d05a7b44bd1570306e46c2c83beeL532),
below highlighted template's doc will disappear now.
```diff
  @get
  listWithEtag is StandardResourceOperations.ResourceList<
    Resource,
    ResponseHeadersTrait<EtagResponseEnvelope>
  >;

  /**
++   * Resource list operation template.
   * @template Resource Resource type.
   * @template Traits Object describing the traits of the operation.
   */
  @Foundations.Private.ensureVerb("ResourceList", "GET")
  ResourceList<
    Resource extends TypeSpec.Reflection.Model,
    Traits extends TypeSpec.Reflection.Model = {}
  > is Foundations.ResourceList<
    Resource,
    TraitProperties<Traits & InterfaceTraits, TraitLocation.Parameters, TraitContext.List>,
    Foundations.CustomPage<Resource, Traits & InterfaceTraits>,
    Traits & InterfaceTraits,
    ErrorResponse
  >;
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:java Issue for the Java client emitter: @typespec/http-client-java
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant