-
Notifications
You must be signed in to change notification settings - Fork 75
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
Models not generated in typescript SDK #2033
Comments
@zoeyzuo-se There're two kinds of issues here, the first one is about template arguments, the second one is about using a model in query parameters.
or just generate something like the below is also okay?
For the second one, I wonder how you want to deserialize the model in query parameter ? According to the OpenAPI3 definition about query parameters here https://swagger.io/docs/specification/describing-parameters/#query-parameters
@xirzec as this is https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client-rest/src/urlHelpers.ts#L36-L58 how we build the query parameters in the url now, I think we should also expand the type to object for it in core-client-rest ? Or codegen should just generate some serializationHelper and pass it as a string to the core-client-rest. |
May also need some design input from TypeSpec about how to specify the serialization for object in query parameters. see microsoft/typespec#2476 |
Hi @qiaozha, thanks for your reply. For the first issue (with For the second issue (with |
Hi @qiaozha, wondering if there are any updates on this issue? We can bypass the second issue by redesigning our implementation in typespec by not using an object in query parameters. But the first issue still exists. I guess it's because using I have another example of this: model VegetableCarrot extends Record<Carrots[]> {}
model VegetableBeans extends Record<Beans[]> {}
model Vegetables {
carrots: VegetableCarrot,
beans: VegetableBeans
}
model Carrots {
color: string,
id: string
}
model Beans {
expiry: string,
id: string
} In the above example, both |
sorry, we are on a holiday leave, I will take a look. |
@zoeyzuo-se I think the model missing issue should have been resolved with the latest release https://www.npmjs.com/package/@azure-tools/typespec-ts/v/0.17.1. Also create another issue #2071 to track the object type parameters in path and query support. Feel free to let me know if there's anything I am missing :) |
Hi team,
I'm using
@azure-tools/typespec-ts
emitter to generate RLC SDK from typespec files directly but facing an issue where some of the models are not generated in the RLC SDK. This can be reproduced by using the below typespec.Identifers
andSearchFilter
were not generated even though they are referenced by another property.Dependencies (please note that I didn't use the latest version with @typespec/compiler v0.48 because it's throwing out error when compiling)
Would be appreciated if someone could take a look :) And please let me know if you need more information on this.
The text was updated successfully, but these errors were encountered: