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

Modular generation for typespec-todo #2927

Merged
merged 10 commits into from
Dec 12, 2024
Merged

Conversation

timovv
Copy link
Member

@timovv timovv commented Nov 25, 2024

  • support tcgc type for ModelProperty
  • remove baseUrl in unbranded client
  • remove property if visibility with none.


// @public (undocumented)
export interface TodoItemsUpdateBodyParam {
create: (item: TodoItem, options?: TodoItemsCreateOptionalParams) => Promise<{
Copy link
Member Author

@timovv timovv Nov 25, 2024

Choose a reason for hiding this comment

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

Response is an anonymous model but should be a reference to the named model? investigate

Copy link
Member Author

Choose a reason for hiding this comment

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

This happens in quite a few places

Copy link
Member

Choose a reason for hiding this comment

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

This is because of there is an @visibilty(create) and this caused we failed to get effective model there, if the visibility create is removed, this should be fixed.

Confirmed with Renhe as below

No need to support visibility create for now. The spec will be updated.

model TodoItem {
/** The item's unique id */
@key id: safeint;
@visibility("read") @key id: safeint;
Copy link
Member Author

Choose a reason for hiding this comment

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

@visibility not respected

Copy link
Member

@MaryGao MaryGao Dec 5, 2024

Choose a reason for hiding this comment

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

read-only should be respected and this is the only case we supported now(codegen code).

@MaryGao MaryGao mentioned this pull request Nov 27, 2024
@MaryGao MaryGao marked this pull request as ready for review December 12, 2024 03:15
@MaryGao MaryGao merged commit 8f55b96 into Azure:main Dec 12, 2024
15 checks passed
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.

3 participants