-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Labels
RLCcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Hi Team,
I have below model definitions in Typespec and I found the the interfaces CatDef and DefaultPets will be missed in the generated codes. However, switching to modular mode (setting is-modular-library to true), the interfaces are generated.
model DefaultPets {
catList?: CatDef[] = #[
#{
catType: "American Shorthair"
}
];
}
model PetSettings {
petList?: {
cat?: DefaultPets.catList;
},
}
model CatDef {
catType: string;
}
The problem seems relates to cat?: DefaultPets.catList in model PetSettings. After changing it to below, the interface CatDef can be generated.
model PetSettings {
petList?: {
cat?: CatDef[] = #[
#{
catType: "American Shorthair"
}
];
},
}
Here is my emitter setting in tspconfig.yaml:
emit:
- '@azure-tools/typespec-ts'
options:
"@azure-tools/typespec-ts":
azure-sdk-for-js: false
enable-operation-group: true
include-shortcuts: true
is-modular-library: false
ignore-property-name-normalize: true
Reactions are currently unavailable
Metadata
Metadata
Labels
RLCcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that