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

DeliveryClient ignores Type #395

Open
SBS-Ferry opened this issue Oct 16, 2024 · 1 comment
Open

DeliveryClient ignores Type #395

SBS-Ferry opened this issue Oct 16, 2024 · 1 comment
Assignees

Comments

@SBS-Ferry
Copy link

DeliveryClient.GetItem("Codename") delivers object of wrong type with given codename and tries to fit it in requested object type, please see attached screenshot.
kontentai_type_bug

@pokornyd pokornyd self-assigned this Nov 14, 2024
@pokornyd
Copy link
Member

hello and thank you for your submission. the type parameter T in GetItemAsync<T> should either point to an existing strongly typed model the item you're requesting is based on, or it should be object, if you use TypeProvider to detect the type at runtime. in either case, using models/type provider from model generator is advised, as it ensures correct mapping of the response to its corresponding model.

have you used the model generator to create KontentAIType? if so, may I ask for version of the sdk and generator and ideally steps to reproduce this behavior?

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

No branches or pull requests

2 participants