Open impact-merlinzerbe opened 5 months ago
Hi @impact-merlinmarek,
Thank you for raising the issue !
Yes, support for only int should be changed to string in case of packageId. We will try to provide the solution as soon as possible.
Hi @juileetikekar ,
I think there is a conflict between the pdf specification and the openapi documentation:
The pdf specification contains the output parameter packageId
of type string
while the openapi specification defines the return type as a json object of type PackageDescription
. Since the openapi specification is referenced in the pdf file, I consider both to be "the standard".
Do you have more information which of these definitions should take precedence or is this something I should raise an issue for in the specs repo?
Hi @impact-merlinzerbe,
Well, in general, in case of inconsistencies between the pdf and the openAPI, the issue needs to be created in the specs repo. However, the PackageDescription object consists of the PackageId as string.
Describe the bug
The package explorer tries to parse the response of a PostAASXPackage operation as an integer which conflicts the specification:
https://github.com/eclipse-aaspe/package-explorer/blob/423f03f50f51749329a5259eaf7b7c6bc31667d1/src/AasxPackageLogic/PackageCentral/AasxFileServerInterface/AasxServerService.cs#L245
However the official openapi documentation specifies the reponse type of the operation as a json object of type
PackageDescription
(see https://app.swaggerhub.com/apis/Plattform_i40/AasxFileServerServiceSpecification/V3.0.1_SSP-001).If such a json response is sent, the package explorer fails, trying to parse the response as an integer:
To Reproduce
Steps to reproduce the behavior:
Run this go file:
Add a new File -> AASX File Repository -> Connect HTTP/REST Repository -> "http://localhost:1234"
Click vertical dots on new file repository -> Add AASX File to File Repository -> Choose any .aasx file
See error in logs
Expected behavior
The package explorer should parse the response as json as defined in the official openapi documentation and not fail.
Desktop (please complete the following information):