Skip to content

Commit 2849890

Browse files
committed
Update openapi docs
1 parent f1972eb commit 2849890

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

docs/other/openapi.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@ the `scala-sttp` code generator, included in the [openapi-generator](https://git
55

66
## Using the openapi-generator
77

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
912

1013
### Standalone setup
1114

1215
This is the simplest setup which relies on calling openapi-generator manually and generating a complete sbt project from it.
1316

1417
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.
1518

16-
Keep in mind that the `scala-sttp` generator is available only since v5.0.0-beta.
17-
1819
Next, call the generator with the following options:
1920

2021
```bash
2122
openapi-generator-cli generate \
2223
-i petstore.yaml \
23-
--generator-name scala-sttp \
24+
--generator-name scala-sttp4-jsoniter \
2425
-o samples/client/petstore/
2526
```
2627

@@ -40,7 +41,7 @@ lazy val petstoreApi: Project = project
4041
.in(file("petstore-api"))
4142
.settings(
4243
openApiInputSpec := s"${baseDirectory.value.getPath}/petstore.yaml",
43-
openApiGeneratorName := "scala-sttp",
44+
openApiGeneratorName := "scala-sttp4-jsoniter",
4445
openApiOutputDir := baseDirectory.value.name,
4546
libraryDependencies ++= Seq(
4647
"com.softwaremill.sttp.client4" %% "core" % "@VERSION@",
@@ -90,7 +91,7 @@ lazy val petstoreApi: Project = project
9091
.in(file("petstore-api"))
9192
.settings(
9293
openApiInputSpec := s"${baseDirectory.value.getPath}/petstore.yaml",
93-
openApiGeneratorName := "scala-sttp",
94+
openApiGeneratorName := "scala-sttp4-jsoniter",
9495
openApiOutputDir := baseDirectory.value.name,
9596
openApiIgnoreFileOverride := s"${baseDirectory.in(ThisBuild).value.getPath}/openapi-ignore-file",
9697
libraryDependencies ++= Seq(
@@ -108,4 +109,4 @@ Full demo project is available on [github](https://github.com/softwaremill/sttp-
108109
#### Additional notes
109110

110111
Although recent versions of the IntelliJ IDEA IDE come with "OpenApi Specification" plugin bundled into it, this plugin doesn't seem to support
111-
latest versions of generator and so, it is impossible to generate sttp bindings from it.
112+
latest versions of generator and so, it might be impossible to generate sttp bindings from it.

0 commit comments

Comments
 (0)