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] support generic type decorators in sdk types #966

Merged
merged 27 commits into from
Jun 26, 2024
Merged

Conversation

tadelesh
Copy link
Member

@tadelesh tadelesh commented Jun 6, 2024

resolve: #829, #704

current design:

  1. use whitelist configured in tspconfig.yaml to do decorators filtering, support equal/regex comparison
  2. use jsValue from typespec decorator arguments to get arguments' value
  3. only handle arguments value of typing with number/string/boolean/null/tsp enum member value/tsp literal value, other types will add a diagnostic warning

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jun 6, 2024

All changed packages have been documented.

  • @azure-tools/typespec-client-generator-core
Show changes

@azure-tools/typespec-client-generator-core - feature ✏️

export decorators in allow list to all sdk types

@azure-sdk
Copy link
Collaborator

Copy link
Contributor

@iscai-msft iscai-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks great, thanks for your hard work on this!

@tadelesh tadelesh requested a review from live1206 June 7, 2024 02:36
@tadelesh
Copy link
Member Author

@iscai-msft @live1206 @m-nash could you review again?

Copy link
Contributor

@iscai-msft iscai-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great thanks @tadelesh

@tadelesh tadelesh changed the title [tcgc] initial version to support generic type decorators in sdk types [tcgc] support generic type decorators in sdk types Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a generic dictionary of decorators in TCGC for better extensibility
10 participants