Cannot get response deserialization to work with GS1 EPCIS standard open api. #4885
Labels
Csharp
Pull requests that update .net code
Status: No Recent Activity
status:waiting-for-author-feedback
Issue that we've responded but needs author feedback to close
type:bug
A broken experience
What are you generating using Kiota, clients or plugins?
API Client/SDK
In what context or format are you using Kiota?
Nuget tool
Client library/SDK language
Csharp
Describe the bug
I am trying to generate an API client for an extensive standardised API, namely GS1 EPCIS (see https://ref.gs1.org/standards/epcis/artefacts for the open api in json format).
I really like the way Kiota create a fluent API for the client (most other API generators create quite messy sets of endpoints).
However, this API relies on the oneOf with schema construct for heterogenuous collections derived from a base class. Although I can perfectly call the API and requests seem to serialize properly as far as I can tell, the responses seem to choke on those heterogenuous collections.
Upon inspection the generator seem to use compositing instead of derivation. As stated in the docs on MSDN, this is by design. However, I can't seem any respons to deserialize with that pattern either (oneOf => allOf with discriminator). Also, it's probably not a good idea to modify an API spec that's standardized anyway ...
More specifically, I have problems with the 'EPCISEvent' collections, and the LDContext.
Ask away if more details needed, I am a bit lost as to where to start ...
Cheers
Expected behavior
Implement oneOf as per OpenAPi spec, not necessarily how it's been (mis)used to implement inheritance in the past.
How to reproduce
Generate client from open spec. Create query to existing server for a set of events (eventTypes/ObjectEvent/events/?MATCH_epc=urn:epc:id:sscc:*). The returned EPCISQueryDocument contains nulls in the LDContext and EventList properties.
Open API description file
https://ref.gs1.org/standards/epcis/openapi.json
Kiota Version
1.15
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
No response
Configuration
No response
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: