eclipse-aaspe / server

C# based server for AASX packages
Other
72 stars 52 forks source link

​/shells​/{aasIdentifier}​/submodel-refs response structure is different than swagger definition and PageResult-aascore3.0 conflict #203

Closed EmilAlipiev closed 9 months ago

EmilAlipiev commented 12 months ago

Swagger definition is not a pagedresult but response returned is a pagedresult as shown below.

that causes 2 issues or conflicts. first of all we try to use aas-core3.0-csharp to deserialize response into object but aas-core3.0 doesnt define any Paged-result. Ok, here we can get the inner "Result" json element different way but then how do you actuall deserialize this when it implements IClass interface? without doing your own workaround or customized serializable class. Because standard Serializer needs concrete objects, not interface. you may refer to terate_copy_and_transform but in the example there, you already need an object. So it conflicts itself as you can deserialize this. jsonize also only implement for response as Reference string, not for ReferencePagedResult as it doesnt exist in Aascode3.0 So overall, there is a big conflict in usage and implementation here.

Screenshot 2023-12-06 at 14 09 48

juileetikekar commented 10 months ago

Hi @EmilAlipiev,

Thank you for the query.

However, the implementation is based on AAS-Specifications part 2, which dictates to have pagination for "GetAll" requests including "GetAllSubmodelReferences". Additionally, the swagger definitions also include Pagination. Please see the screenshots below.

Screenshots from AAS Specifications Part 2 (PDF Document) image

image

image

Screenshot from Swagger Definition: image