Skip to content

Commit dd111cb

Browse files
committed
Merge branch 'develop' of https://github.com/swagger-akka-http/swagger-scala-module into develop
2 parents 3ac7874 + 9e8237c commit dd111cb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This is a fork of https://github.com/swagger-api/swagger-scala-module.
77

88
| Release | Supports |
99
| ------- | -------- |
10+
| 2.7.x | *Experimental version, not recommended for swagger-akka-hhtp users.* Scala 2 builds reintroduce scala-reflect dependency and can now introspect better on inner types. See section on `Treatment of Option` below.|
1011
| 2.6.x/2.5.x | First releases to support Scala 3. Jackson 2.13, [jakarta](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started) namespace jars. [OpenAPI 3.0.1](https://github.com/OAI/OpenAPI-Specification) / [Swagger-Core](https://github.com/swagger-api/swagger-core) 2.0.x. |
1112
| 2.4.x | First releases to support [jakarta](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started) namespace jars. Jackson 2.12, [OpenAPI 3.0.1](https://github.com/OAI/OpenAPI-Specification) / [Swagger-Core](https://github.com/swagger-api/swagger-core) 2.0.x. |
1213
| 2.3.x | [OpenAPI 3.0.1](https://github.com/OAI/OpenAPI-Specification) / [Swagger-Core](https://github.com/swagger-api/swagger-core) 2.0.x. |
@@ -25,13 +26,15 @@ Including the library in your project allows the swagger extension module to dis
2526
## Treatment of `Option` and `required`
2627
All properties, besides those wrapped in `Option` or explicitly set via annotations `@Schema(required = false, implementation = classOf[Int])`, default to `required = true` in the generated swagger model. See [#7](https://github.com/swagger-api/swagger-scala-module/issues/7)
2728

28-
With Collections (and Options), scala primitives are affected by type erasure. You need to declare the type using a Schema annotation.
29+
With Collections (and Options), scala primitives are affected by type erasure. You may need to declare the type using a Schema annotation.
2930
```
3031
case class AddOptionRequest(number: Int, @Schema(required = false, implementation = classOf[Int]) number2: Option[Int] = None)
3132
```
3233

3334
Alternatively, you can non-primitive types like BigInt to avoid this requirement.
3435

36+
Since v2.7.0 release, Scala 2 builds use scala-reflect jar to try to work out the class information for the inner types. Scala 3 builds cannot use this approach, and are therefore still affected by this issue. See https://github.com/swagger-akka-http/swagger-scala-module/issues/117.
37+
3538
License
3639
-------
3740

0 commit comments

Comments
 (0)