Skip to content

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

Merged
qiaozha merged 8 commits intoAzure:mainfrom
zzhxiaofeng:addcoverageforarray
Jan 25, 2024
Merged

Add coverage cases for arrays-item-types in cadl-ranch#2103
qiaozha merged 8 commits intoAzure:mainfrom
zzhxiaofeng:addcoverageforarray

Conversation

@zzhxiaofeng
Copy link
Copy Markdown
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

@zzhxiaofeng zzhxiaofeng marked this pull request as draft November 8, 2023 07:35
@qiaozha qiaozha self-assigned this Jan 18, 2024
@v-jiaodi
Copy link
Copy Markdown
Member

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

Comment thread packages/typespec-ts/src/modular/helpers/operationHelpers.ts Outdated
Comment thread packages/typespec-ts/src/modular/helpers/operationHelpers.ts Outdated
"p",
runtimeImports,
required,
true,
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Add test case , encountered the following error:
image

},
{
type: "datetime",
defaultValue: [new Date("2022-08-26T18:38:00Z")]
Copy link
Copy Markdown
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
Copy Markdown
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
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