Skip to content

fix-get-parent-properties#2017

Merged
qiaozha merged 6 commits intoAzure:mainfrom
qiaozha:fix-get-parent-properties
Sep 14, 2023
Merged

fix-get-parent-properties#2017
qiaozha merged 6 commits intoAzure:mainfrom
qiaozha:fix-get-parent-properties

Conversation

@qiaozha
Copy link
Copy Markdown
Member

@qiaozha qiaozha commented Sep 12, 2023

fixes #2014

Comment thread packages/typespec-ts/src/modular/helpers/operationHelpers.ts
Comment thread packages/typespec-ts/test/modularUnit/modelsGenerator.spec.ts Outdated
}

function getAllProperties(type: Type): Property[] {
const properties: Property[] = [];
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.

nit: not sure this is caused the duplicated properties issues when discriminator property exists both parent and child model. see below cadl-ranch cases:

https://github.com/Azure/cadl-ranch/blob/main/packages/cadl-ranch-specs/http/type/model/inheritance/single-discriminator/main.tsp#L12-L25C1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, I found that, when I was trying to enable cadl ranch test cases for model inheritance in modular.

Copy link
Copy Markdown
Member

@MaryGao MaryGao left a comment

Choose a reason for hiding this comment

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

Left small comments.

@qiaozha qiaozha merged commit edf93ed into Azure:main Sep 14, 2023
@qiaozha qiaozha deleted the fix-get-parent-properties branch September 14, 2023 09:31
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.

[JS] Missing Property From Extension in Deserialize Method

2 participants