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] default .access to "public" instead of undefined #926

Closed
4 tasks done
iscai-msft opened this issue May 28, 2024 · 0 comments · Fixed by #925
Closed
4 tasks done

[tcgc] default .access to "public" instead of undefined #926

iscai-msft opened this issue May 28, 2024 · 0 comments · Fixed by #925
Assignees

Comments

@iscai-msft
Copy link
Contributor

Clear and concise description of the problem

Currently TCGC defaults the .access property on SdkModelType and SdkEnumTypes to .undefined unless the @access decorator is explicitly applied. This was so emitter authors could determine whether the @access was purposefully set, so if they wanted to trim these models and make them private, they could do so.

However, having an undefined default isn't the greatest, so we want to default the value "public" instead of @access is not explicitly set. If an emitter author still cares about whether the @access decorator was explicitly provided, they could call getAccessOverride from the tcgc library

Checklist

  • Follow our Code of Conduct
  • Check that this issue is about the Azure libraries for typespec. For feature request in the typespec language or core libraries file it in the TypeSpec repo
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@iscai-msft iscai-msft self-assigned this May 28, 2024
github-merge-queue bot pushed a commit that referenced this issue May 31, 2024
fixes #926

---------

Co-authored-by: iscai-msft <[email protected]>
Co-authored-by: Chenjie Shi <[email protected]>
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 a pull request may close this issue.

1 participant