-
Notifications
You must be signed in to change notification settings - Fork 76
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
fix-special-union-within-anonymous-model-issue #2767
fix-special-union-within-anonymous-model-issue #2767
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
...es/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/src/models/models.ts
Show resolved
Hide resolved
@@ -1035,6 +1035,198 @@ describe("modular special union serialization", () => { | |||
true | |||
); | |||
}); | |||
|
|||
it("should generate serialize util if there're special discriminated union within a anonymous model", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you simplify this case with the root issue maybe removing un-necessary doc and decorators? Does the anomymous model happen in body type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the idea of directly copying the spec into our UTs because this would introduce a lot of un-necessary changes and also not good for review. we may have plan to remove smoke tests and add more IT or UTs. if these test cases are not small, we may not be effective either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes #2768
fixes #2772