diff --git a/readme.md b/readme.md index 1b1099687feb74d6c749a07d5e581759395a1ae0..8ee30a24ca2222983288126ec3c331bbab53bfb9 100644 --- a/readme.md +++ b/readme.md @@ -23,7 +23,6 @@ It includes description and code for a fully functional server with MongoDB inte |:-:|:--------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| | 📂 | openapi | A git submodule (ForgeETSI ) pointing to the repo containing the API specification file | | 📂 | 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/worldstorage/src/ETSI.ARF.OpenAPI.WorldStorage | This is the location where the ASP.Net code will be generated | | 📂 | server/worldstorage/src/ETSI.ARF.OpenAPI.WorldStorage/ETSI-ARF | This folder contains codes implementating the REST end-paths for the different objects in API | | 📂 | 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 | @@ -55,7 +54,7 @@ Open `NuGet Package Manager` and add `MongoDB.Driver`. ### File adaptations Change version number in all files if a new version is provided. -### Custom folder (new) +## 📂 Custom folders (new) All custom files are now in the folder 'ETSI-ARF'. Nothing to do adapt manually after generation. But you have to provide the implementation of new endpoints because they are now directly declared as abstract (default). The folder contains following subfolders: @@ -63,7 +62,7 @@ The folder contains following subfolders: `ModelsExt` `Services` -### Folder 'ControllersImp' +### 📂 Folder 'ControllersImp' The modules in this folder implement the endpoints. Compare files folder in "`ETSI-ARF/ControllersImpl`" with the corresponding files in "`Controllers`" and implement if necessary the new methods. @@ -95,7 +94,7 @@ public TrackablesApiControllerImpl(TrackableService trackableService) Implement endpoint code using the appropriate MongoDB methods of the corresponding classes from the folder `Services` (which you may be have to create). -### Folder `ModelsExt` +### 📂 Folder `ModelsExt` The modules inside this folder are for extensions of the generated API data structures. Add all the classes to be stored in the database (i.e. `TrackableExt.cs`, `WorldAnchorExt.cs`, `WorldLinkExt.cs`) inherited from `IModels`. (definition of the extra UUID): ``` using MongoDB.Bson; @@ -113,12 +112,12 @@ If some members won't be saved in the MongoDB then use this keyword: [BsonIgnore] ``` -### Folder `Services` +### 📂 Folder `Services` The folder `Services` is for handling the data with the MongoDB. It should contain one common class with the DatabaseSettings (`DatabaseSettings.cs`) and one with the database-access-methods (create, get, update, remove) for each API. If some are missing create them like the ones you find there. Be aware to add the reference to these in the file `startup.cs` in this case. The naming in the DatabaseSettings is the same as defined in `appsettings.json`, which you have to extend when creating new classes in this folder. Change `appsettings.json` in the folder `docker` accordingly. Make sure that the ConnectionString for the database contains the correct IP address as specified in `docker-compose.yml`. -## Extra folder `wwwroot` +## 📂 Extra folder `wwwroot` Add in `openapi-original.json` in section `servers` the urls of the servers you want to use with swagger-ui # MongoDB