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

[TCGC][Bug] getAllModels, description is not correctly returned for scalar types #555

Closed
Tracked by #2564
haolingdong-msft opened this issue Apr 1, 2024 · 0 comments · Fixed by #573
Closed
Tracked by #2564
Assignees
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@haolingdong-msft
Copy link
Member

haolingdong-msft commented Apr 1, 2024

TSP definition:

// namespace MyService.LongRunning
model JobResult
  is LroOperationStatus<{
    data: string;
  }>;

model LroOperationStatus<TStatusResult = never, TStatusError = Foundations.Error> {
  @key("operationId")
  @visibility("read")
  id: Azure.Core.uuid;

  @visibility("read")
  @lroStatus
  status: JobStatus;

  @visibility("read")
  createdDateTime?: utcDateTime;

  @visibility("read")
  expirationDateTime?: utcDateTime;

  @visibility("read")
  lastUpdateDateTime?: utcDateTime;

  error?: TStatusError;
  result?: TStatusResult;
}

// namespace Azure.Core;
/**
 * Universally Unique Identifier
 *
 * @example
 *
 * ```
 * 123e4567-e89b-12d3-a456-426614174000
 * ```
 */
@format("uuid")
scalar uuid extends string;

Neither the TCGC returned id property, nor the property.type have description Universally Unique Identifier. I think we should add the correct description on the type.
Other scalar types like boolean also have this issue.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants