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
Copy file name to clipboardExpand all lines: README.md
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,9 @@ Python library for eLabFTW REST API.
7
7
8
8
# Description
9
9
10
-
This repository allows generating a python library to interact with [eLabFTW](https://github.com/elabftw/elabftw) REST API v2. It uses [Openapi Generator](https://github.com/OpenAPITools/openapi-generator) to generate it based on the OpenApi specification of [eLabFTW REST API v2](https://doc.elabftw.net/api/v2/).
10
+
This repository allows generating a python library to interact with [eLabFTW](https://github.com/elabftw/elabftw) REST API v2. It uses [Swagger Codegen](https://github.com/swagger-api/swagger-codegen/tree/3.0.0) to generate it based on the OpenApi specification of [eLabFTW REST API v2](https://doc.elabftw.net/api/v2/).
11
+
12
+
Alternatively, it supports using [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) as an optional code generation tool.
11
13
12
14
As such, it doesn't contain the generated code, but only instructions on how to generate it for local development.
13
15
@@ -62,15 +64,29 @@ From TU Graz, Shared RDM Project:
62
64
63
65
## Using the helper script
64
66
65
-
~~~bash
66
-
# generate the library
67
+
### Generate the library using Code Generators
68
+
69
+
The primary tool for generating the library is swagger-codegen. However, you can also use OpenAPI Generator as an alternative, if it better suits your requirements or you encounter issues with the default.
70
+
71
+
```bash
72
+
# Option 1: Generate using Swagger Codegen
67
73
./helper.sh generate
68
-
# generate from local file: openapi.yaml must be in current dir
74
+
75
+
# Option 2: Generate using OpenAPI Generator
76
+
GENERATOR_TOOL=openapi ./helper.sh generate
77
+
```
78
+
79
+
### Or Generate from a local OpenAPI Specification
80
+
Ensure the `openapi.yaml` file is located in the current working directory, then run:
0 commit comments