From 74a0f49930ccd051fc3e767ebaffcad241dccf1c Mon Sep 17 00:00:00 2001 From: Sylvain Renault Date: Mon, 25 Mar 2024 13:48:34 +0100 Subject: [PATCH] New descr. --- README.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 08b8a18..4c0112c 100644 --- a/README.md +++ b/README.md @@ -27,16 +27,39 @@ The simplest way to check out the project including the submodule is to use the The referenced submodule contains the OpenAPI specification of the ISG ARF World Storage. To checkout the newest version of it use the following commands: - cd ARF005WorldStorageAPI + cd openapi git checkout master cd .. +# Installing NSwag + + npm install nswag -g + +You can check the version with + + npx nswag version + # Code Generation To generate the code and the DLLs use the following commands: - npm install - npm run build + npx nswag run WorldStorageNSwag.json + npx nswag run WorldAnalysisNSwag.json + +The generated C# modules (one per definition file) are then contained in the folder `client/csharp-nswag`. + +# How to proceed then? + +Copy the cs file(s) to your CSharp project or Unity asset folder + +## Unity + +Add the NewtonSoft package: +"com.unity.nuget.newtonsoft-json": "3.2.1", + +Change the Unity prefs to use the NET Framework (not only 2.1) + +Add a file "csc.rsp": +-r:System.ComponentModel.DataAnnotations.dll -The generated library and its depencies are then contained in the folder `generated_client/bin`. -- GitLab