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

Add coverage cases for arrays-item-types in cadl-ranch #2103

Merged
merged 8 commits into from
Jan 25, 2024

Conversation

zzhxiaofeng
Copy link
Contributor

@zzhxiaofeng zzhxiaofeng commented Nov 8, 2023

fixes #2215
When generate test SDK for arrays-item-types, it failed and returns an error which is shown as following:
image

@v-jiaodi
Copy link
Member

@qiaozha When running integration-test, get error as follow:
image

@@ -944,7 +944,7 @@ function deserializeResponseValue(
type.elementType!,
"p",
runtimeImports,
required,
true,
Copy link
Member

Choose a reason for hiding this comment

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

Just found typespec can't not define this way playground link

Copy link
Member

@qiaozha qiaozha Jan 25, 2024

Choose a reason for hiding this comment

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

I would assume elementTypes are all required, for nullable, since the current nullable logic has problem, I would prefer to have another independent pr to fix it. @MaryGao let me know if you have different thoughts.

@v-jiaodi
Copy link
Member

Add test case , encountered the following error:
image

},
{
type: "datetime",
defaultValue: [new Date("2022-08-26T18:38:00Z")]
Copy link
Member

Choose a reason for hiding this comment

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

Datetime type is a Date typescript type in modular.

Comment on lines +46 to +47
{ property: "hello", children: undefined },
{ property: "world", children: undefined }
Copy link
Member

Choose a reason for hiding this comment

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

the children: undefined are added by the current serialization and deserialization logic in modular.

@qiaozha qiaozha marked this pull request as ready for review January 25, 2024 06:22
@qiaozha qiaozha merged commit 280701c into Azure:main Jan 25, 2024
28 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.

type of array with all kinds of element types
4 participants