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: docs/other/openapi.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,22 +5,23 @@ the `scala-sttp` code generator, included in the [openapi-generator](https://git
5
5
6
6
## Using the openapi-generator
7
7
8
-
For `scala-sttp`'s generator's configuration options refer to: [https://openapi-generator.tech/docs/generators/scala-sttp](https://openapi-generator.tech/docs/generators/scala-sttp).
8
+
There are two generators that you can use:
9
+
10
+
*[scala-sttp4-jsoniter](https://openapi-generator.tech/docs/generators/scala-sttp4-jsoniter), using sttp-client 4, Scala 3 and jsoniter-scala for JSON
11
+
*[scala-sttp](https://openapi-generator.tech/docs/generators/scala-sttp), using sttp-client 4, json4s or circe for JSON
9
12
10
13
### Standalone setup
11
14
12
15
This is the simplest setup which relies on calling openapi-generator manually and generating a complete sbt project from it.
13
16
14
17
First, you will need to install/download openapi-generator. Follow openapi-generator's [official documentation](https://github.com/OpenAPITools/openapi-generator#1---installation) on how to do this.
15
18
16
-
Keep in mind that the `scala-sttp` generator is available only since v5.0.0-beta.
17
-
18
19
Next, call the generator with the following options:
19
20
20
21
```bash
21
22
openapi-generator-cli generate \
22
23
-i petstore.yaml \
23
-
--generator-name scala-sttp \
24
+
--generator-name scala-sttp4-jsoniter \
24
25
-o samples/client/petstore/
25
26
```
26
27
@@ -40,7 +41,7 @@ lazy val petstoreApi: Project = project
0 commit comments