From b848a9774324ceedcb8ef6d002a9be1d0a4fe1b4 Mon Sep 17 00:00:00 2001 From: Nathan Chambron Date: Tue, 13 Sep 2022 09:14:11 +0000 Subject: [PATCH 1/6] add header to readme --- readme.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index bc84c31..82ebb17 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,14 @@ +*This repository is part of the outcomes of the Specialist Task Force 620 focusing on the authoring of a World Representation as part of the ETSI ISG Augmented Reality Framework architecture (https://www.etsi.org/deliver/etsi_gs/ARF/001_099/003/01.01.01_60/gs_ARF003v010101p.pdf).* +*The set of the World Representation authoring components includes:* + +*• The C++ and C# source code for servers and clients generated from OpenAPI available here (https://forge.etsi.org/rep/arf/arf005)* + +*• A Unity plugin and a Unity editor for authoring and accessing a World Representation hosted on a World Storage server.* + +*All these components are available under the ETSI Labs group “World Storage API Helpers”: https://labs.etsi.org/rep/arf/world-storage-api-helpers* + +--- + # Description of version 1.0.0 This project should be used to construct a complete ASP-Net REST server compliant to the ARF World Storage API. It uses auto-generated ASP.NET server code. We propose to use the open source OpenAPI-Generator for this. @@ -125,4 +136,4 @@ Execute the following command in docker: Execute the following command in docker: ``` mongorestore --db **insert database_name** **insert path_to_bson_file** -``` \ No newline at end of file +``` -- GitLab From e4133a366a2ee8259ea4b8d55ec1213c48f36149 Mon Sep 17 00:00:00 2001 From: Sylvain Renault Date: Tue, 20 Sep 2022 10:18:36 +0000 Subject: [PATCH 2/6] Update readme.md --- readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 82ebb17..81b3e96 100644 --- a/readme.md +++ b/readme.md @@ -49,7 +49,7 @@ Methods should be the same with "`override`" instead of "`virtual`". --- -#### - if files are missing (and only then): +#### If some files are missing (and only then!): Copy them from folder `Controllers`, rename them (append `Impl`) and handle them like the already existing files, i.e.: Change classnames by appending `Impl` to the original classnames (and change filenames accordingly) and inherit from original class in `Controllers` (instead of `ControllerBase`) @@ -110,7 +110,7 @@ open a command shell and generate docker by executing in `server/src/Org.OpenAPI docker build -t org.openapitools . ``` -## How to start: +## How to start The easiest way is to use docker-compose: Open a command shell and use docker-compose (if necessary adapt docker-compose.yml) by executing in `server/src/Org.OpenAPITools`: @@ -120,7 +120,7 @@ Open a command shell and use docker-compose (if necessary adapt docker-compose.y Open http://localhost:8080/openapi/index.html in a web-browser, if you want to check the functionalities using SwaggerUI -## How to stop: +## How to stop Open a command shell by executing in `server/src/Org.OpenAPITools`: ``` docker-compose down @@ -132,7 +132,7 @@ Execute the following command in docker: mongodump --db **insert database_name** --out /data-dump/`date +"%Y-%m-%d"` ``` -## How to import database: +## How to import database Execute the following command in docker: ``` mongorestore --db **insert database_name** **insert path_to_bson_file** -- GitLab From b4bffebc4ca248726b24639a47ed2f80b618dc80 Mon Sep 17 00:00:00 2001 From: Sylvain Renault Date: Tue, 20 Sep 2022 10:20:22 +0000 Subject: [PATCH 3/6] Update readme.md --- readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index 81b3e96..cf3ea0d 100644 --- a/readme.md +++ b/readme.md @@ -34,13 +34,13 @@ Open a command shell and execute: Open the solution `Org.OpenAPITools.sln` (folder `server`) in Visual Studio: -## In Visual Studio: +## In Visual Studio Open `NuGet Package Manager` and add `MongoDB.Driver`. -### File adaptations: +### File adaptations Change version number in all files if a new version is provided. -### In the folder `Controllers`: +### In the folder `Controllers` Change "`public class`" to "`public abstract class`". Compare files folder in "`ControllersImpl`" with the corresponding files in "`Controllers`" and adapt if necessary. @@ -49,7 +49,7 @@ Methods should be the same with "`override`" instead of "`virtual`". --- -#### If some files are missing (and only then!): +#### If some files are missing (and only then!) Copy them from folder `Controllers`, rename them (append `Impl`) and handle them like the already existing files, i.e.: Change classnames by appending `Impl` to the original classnames (and change filenames accordingly) and inherit from original class in `Controllers` (instead of `ControllerBase`) @@ -69,7 +69,7 @@ Remove sample code and replace it by using the appropriate methods of the corres --- -### In the folder `Models`: +### In the folder `Models` Add to the classes to be stored in the database (i.e. `Trackable.cs`, `WorldAnchor.cs`, `WorldLink.cs`) : ``` using MongoDB.Bson; -- GitLab From 0bd7b8093a02c81f392cd762fc7495f884a5c181 Mon Sep 17 00:00:00 2001 From: Nathan Chambron Date: Mon, 26 Sep 2022 07:32:46 +0000 Subject: [PATCH 4/6] Update readme.md --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index cf3ea0d..6b63ef2 100644 --- a/readme.md +++ b/readme.md @@ -7,6 +7,8 @@ *All these components are available under the ETSI Labs group “World Storage API Helpers”: https://labs.etsi.org/rep/arf/world-storage-api-helpers* +*If you wish to contribute to this project or any other projects in the context of the [ETSI ISG Augmented Reality Framework architecture](https://www.etsi.org/committee/1420-arf), please refer to the ["How to get involved in an ISG" section on the ETSI website](https://www.etsi.org/how-to-get-involved-in-an-isg)* + --- # Description of version 1.0.0 -- GitLab From e3fcf4fc7ffb6e6296c05257771bf399d5612392 Mon Sep 17 00:00:00 2001 From: Sylvain Renault Date: Mon, 26 Sep 2022 08:07:42 +0000 Subject: [PATCH 5/6] Update readme.md --- readme.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index cf3ea0d..26836cf 100644 --- a/readme.md +++ b/readme.md @@ -9,20 +9,30 @@ --- -# Description of version 1.0.0 +# Description -This project should be used to construct a complete ASP-Net REST server compliant to the ARF World Storage API. It uses auto-generated ASP.NET server code. We propose to use the open source OpenAPI-Generator for this. +This repo should be used to construct a complete ASP-Net REST server compliant to the ARF World Storage API. It uses auto-generated ASP.NET server code. We propose to use the open source OpenAPI-Generator for this. It includes description and code for a fully functional server with MongoDB integration. -# Prerequisites +## Repo Content + +| | File / Folder | Description | +|:-:|:--------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| 📂 | EtsiServerGen | The folder where the library code will be generated, the openapi generator is set to not overwrite the CmakeLists.txt used to generate and export the library to the user's sytem | +| 📂 | EtsiServerImpl | This folder contains a basic implementation of this library, its main set up a local hosted server on port 8080 waiting for CRUD REST queries on the Trackable objects | +| 📂 | arf005 | A submodule pointing to the git containing the API specification file | +| 📃 | package.json | The file containing the npm scripts automating the whole library generation process | + +## Requirements + What you need: 1. Installed npm: https://phoenixnap.com/kb/install-node-js-npm-on-windows 2. Installed openapi generator with npm: https://openapi-generator.tech/docs/installation/ 3. Installed docker (if you want to use it): https://www.docker.com/get-started -# Generate or update the server +# Code Generation We provided the file `.openapi-generator-ignore` in `server`, which prevents openapi-generator to override some adapted files. -- GitLab From 9bda3b0c6042cb854d08f6ddf681c4a471a0b113 Mon Sep 17 00:00:00 2001 From: Sylvain Renault Date: Mon, 26 Sep 2022 09:32:03 +0000 Subject: [PATCH 6/6] Update readme.md --- readme.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 26836cf..637f0d2 100644 --- a/readme.md +++ b/readme.md @@ -19,10 +19,12 @@ It includes description and code for a fully functional server with MongoDB inte | | File / Folder | Description | |:-:|:--------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| 📂 | EtsiServerGen | The folder where the library code will be generated, the openapi generator is set to not overwrite the CmakeLists.txt used to generate and export the library to the user's sytem | -| 📂 | EtsiServerImpl | This folder contains a basic implementation of this library, its main set up a local hosted server on port 8080 waiting for CRUD REST queries on the Trackable objects | -| 📂 | arf005 | A submodule pointing to the git containing the API specification file | -| 📃 | package.json | The file containing the npm scripts automating the whole library generation process | +| 📂 | server | The folder where the library code will be generated, the openapi generator is set to not overwrite some files used to generate and initialiue the ASP.Net server system | +| 📂 | server/programs/MongoDB | This folder contains the MongoDB service. The World Storage database should be created or imported in a folder of your choice which path has to be editied in the .bat file | +| 📂 | server/src/Org.OpenAPITools | This is the location where the ASP.Net code will be generated | +| 📂 | server/src/Org.OpenAPITools/ControllersImpl | THis folder contains the code implementating the REST end-paths for the different objects in API | +| 📂 | server/src/Org.OpenAPITools/Services | This folder contains MongoDB database settings and access methods for each API | +| 📂 | arf005 | A submodule pointing to the git containing the API specification file | ## Requirements -- GitLab