You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If such a json response is sent, the package explorer fails, trying to parse the response as an integer:
Error: Unhandled exception in AasxPackageExplorer v1.0.0.0: Input string was not in a correct format. Input string was not in a correct format. at at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at AasxPackageLogic.PackageCentral.AasxFileServerInterface.AasxServerService.PostAASXPackage(Byte[] fileContent, String fileName, PackageContainerAasxFileRepository fileRepository) in D:\a\package-explorer\package-explorer\src\AasxPackageLogic\PackageCentral\AasxFileServerInterface\AasxServerService.cs:line 219
at AasxPackageLogic.PackageCentral.AasxFileServerInterfaceService.PostAasxFileOnServer(String fileName, Byte[] fileContent, PackageContainerAasxFileRepository fileRepository) in D:\a\package-explorer\package-explorer\src\AasxPackageLogic\PackageCentral\AasxFileServerInterface\AasxFileServerInterfaceService.cs:line 103
at AasxPackageLogic.PackageCentral.AasxFileServerInterface.PackageContainerAasxFileRepository.AddPackageToServer(String fileName) in D:\a\package-explorer\package-explorer\src\AasxPackageLogic\PackageCentral\AasxFileServerInterface\PackageContainerAasxFileRepository.cs:line 114
at AasxWpfControlLibrary.PackageCentral.PackageContainerListOfListControl.CommandBinding_FileRepoAll(Control senderList, PackageContainerListBase fr, String cmd) in D:\a\package-explorer\package-explorer\src\AasxWpfControlLibrary\PackageCentral\PackageContainerListOfListControl.xaml.cs:line 329
at AasxWpfControlLibrary.PackageCentral.PackageContainerListOfListControl.<>c__DisplayClass25_0.<<PackageContainerListControl_ButtonClick>b__0>d.MoveNext() in D:\a\package-explorer\package-explorer\src\AasxWpfControlLibrary\PackageCentral\PackageContainerListOfListControl.xaml.cs:line 466
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler).
impact-merlinzerbe
changed the title
[BUG] expects an integer as server response an aasx file is added to a file repository
[BUG] expects an integer as server response when a new aasx file is added to a file repository
Jun 14, 2024
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?
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:
package-explorer/src/AasxPackageLogic/PackageCentral/AasxFileServerInterface/AasxServerService.cs
Line 245 in 423f03f
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):
The text was updated successfully, but these errors were encountered: