Skip to content
Snippets Groups Projects
Commit 0a30a614 authored by Jerome Royan's avatar Jerome Royan
Browse files

update code generation from the last version of OpenAPIs

parent 4c62ccdc
No related branches found
No related tags found
No related merge requests found
diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml
index 436b258..e141fc1 100644
--- a/API/worldanalysis/worldanalysisopenapi.yaml
+++ b/API/worldanalysis/worldanalysisopenapi.yaml
@@ -140,7 +140,10 @@ paths:
description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
required: true
schema:
- $ref: '../common/commonopenapi.yaml#/components/schemas/Mode_WorldAnalysis'
+ description: Mode representing the context of the relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
+ type: string
+ enum: [TRACKABLES_TO_DEVICE, DEVICE_TO_TRACKABLES]
+ example: TRACKABLES_TO_DEVICE
responses:
'200':
description: Successful operation.
#!/bin/bash #!/bin/bash
patch -u ../api/DefaultApi.h -i fixHeaderDefaultApi.patch patch -u ../api/DefaultApi.h -i fixHeaderDefaultApi.patch
patch -u ../api/DefaultApi.cpp -i fixCppDefaultApi.patch patch -u ../api/DefaultApi.cpp -i fixCppDefaultApi.patch
patch -u ../api/PoseApi.cpp -i fixCppPoseApi.patch patch -u ../api/PoseApi.cpp -i fixCppPoseApi.patch
\ No newline at end of file #patch -u ../api/PoseApi.h -i fixHeaderPoseApi.patch
\ No newline at end of file
#!/bin/bash
cp ../arf005/API/worldanalysis/worldanalysisopenapi.yaml ../arf005/API/worldanalysis/worldanalysisopenapiPatched.yaml && patch -u ../arf005/API/worldanalysis/worldanalysisopenapiPatched.yaml -i ./patches/WorldAnalysisYaml.patch
\ No newline at end of file
--- PoseApi.cpp 2024-08-29 17:22:20.037445629 +0200 --- PoseApi.cpp 2024-09-17 15:11:41.869045502 +0200
+++ PoseApi_corrected.cpp 2024-08-29 16:56:57.582073400 +0200 +++ PoseApi_corrected.cpp 2024-09-17 15:12:57.909058480 +0200
@@ -453,7 +453,7 @@ @@ -468,7 +468,7 @@
std::vector<GetPoses_uuid_parameter_inner> uuid; std::vector<UuidAndMode> uuid;
std::vector<std::string> uuid_temp; std::vector<std::string> uuid_temp;
boost::split(uuid_temp, uuid_raw, boost::is_any_of(",")); boost::split(uuid_temp, uuid_raw, boost::is_any_of(","));
- std::transform(uuid_temp.begin(), uuid_temp.end(), std::back_inserter(uuid), [](const auto& i){ GetPoses_uuid_parameter_inner ret; ret.fromString(i); return ret;}); - std::transform(uuid_temp.begin(), uuid_temp.end(), std::back_inserter(uuid), [](const auto& i){ UuidAndMode ret; ret.fromString(i); return ret;});
+ std::transform(uuid_temp.begin(), uuid_temp.end(), std::back_inserter(uuid), [](const auto& i){ GetPoses_uuid_parameter_inner ret; ret.setUuid(i); return ret;}); + std::transform(uuid_temp.begin(), uuid_temp.end(), std::back_inserter(uuid), [](const auto& i){ UuidAndMode ret; ret.fromJsonString(i); return ret;});
// Getting the headers // Getting the headers
std::string token = request->get_header("token", ""); std::string token = request->get_header("token", "");
std::string sessionID = request->get_header("sessionID", ""); std::string sessionID = request->get_header("sessionID", "");
arf005 @ 0430c599
Subproject commit 11d0dac99c94ccf7efcda826bf5bfdb56fde30cb Subproject commit 0430c599248eecaf5a0cb7ea41ff88b87efaec4c
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"description": "ISG ARF World Analysis Cpp Server", "description": "ISG ARF World Analysis Cpp Server",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"generate": "cd EtsiServerGen && java -jar /usr/local/lib/node_modules/@openapitools/openapi-generator-cli/versions/7.5.0.jar generate -i ../arf005/API/worldanalysis/worldanalysisopenapi.yaml --skip-validate-spec --type-mappings=set=std::vector -g cpp-restbed-server -o . && cd patches && ./applyPatches.sh", "generate": "cd EtsiServerGen && ./patches/applyYamlPatch.sh && java -jar /usr/local/lib/node_modules/@openapitools/openapi-generator-cli/versions/7.5.0.jar generate -i ../arf005/API/worldanalysis/worldanalysisopenapiPatched.yaml --skip-validate-spec --type-mappings=set=std::vector -g cpp-restbed-server -o . && cd patches && ./applyPatches.sh",
"build": "cd EtsiServerGen && conan install . --build=missing && cd build && cmake .. --preset conan-release && cd Release && cmake --build . && sudo make install" "build": "cd EtsiServerGen && conan install . --build=missing && cd build && cmake .. --preset conan-release && cd Release && cmake --build . && sudo make install"
}, },
"devDependencies": { "devDependencies": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment