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
This is a simple example application demonstrating the use of springdoc-openapi-scala with Spring Boot 2.x.
4
+
5
+
## Prerequisites
6
+
7
+
- JDK 17 or higher
8
+
- SBT 1.x
9
+
- Scala 2.12.x
10
+
11
+
## Running the Application
12
+
13
+
To run the application with hot-reload enabled:
14
+
15
+
```bash
16
+
cd springdoc-openapi-scala/examples/springdoc-openapi-scala-1/simple
17
+
sed -i '''s/`springdoc-openapi-scala-1-version`: String = \?\?\?/`springdoc-openapi-scala-1-version`: String = "0.3.2"/g' build.sbt # Omit '' after the -i flag if not on mac
18
+
sbt compile
19
+
sbt "~reStart"
20
+
```
21
+
22
+
The `~reStart` command will automatically restart the application when source files change.
23
+
24
+
## Accessing the API Documentation
25
+
26
+
Once the application is running, you can access the OpenAPI documentation at:
27
+
28
+
- OpenAPI JSON: http://localhost:8080/v3/api-docs
29
+
30
+
## Features Demonstrated
31
+
32
+
- Integration of springdoc-openapi with Scala classes
33
+
- Automatic schema generation for Scala case classes
34
+
- Support for complex type hierarchies
35
+
- Custom schema customization
36
+
37
+
## Project Structure
38
+
39
+
-`src/main/scala/.../Application.scala` - Spring Boot application entry point
Copy file name to clipboardExpand all lines: examples/springdoc-openapi-scala-1/simple/src/main/scala/za/co/absa/springdocopenapiscala/examples/simple/OpenAPIConfiguration.scala
This is a simple example application demonstrating the use of springdoc-openapi-scala with Spring Boot 3.x.
4
+
5
+
## Prerequisites
6
+
7
+
- JDK 17 or higher
8
+
- SBT 1.x
9
+
- Scala 2.12.x
10
+
11
+
## Running the Application
12
+
13
+
To run the application with hot-reload enabled:
14
+
15
+
```bash
16
+
cd springdoc-openapi-scala/examples/springdoc-openapi-scala-2/simple
17
+
sed -i '''s/`springdoc-openapi-scala-2-version`: String = \?\?\?/`springdoc-openapi-scala-2-version`: String = "0.3.2"/g' build.sbt # Omit '' after the -i flag if not on mac
18
+
sbt compile
19
+
sbt "~reStart"
20
+
```
21
+
22
+
The `~reStart` command will automatically restart the application when source files change.
23
+
24
+
## Accessing the API Documentation
25
+
26
+
Once the application is running, you can access the OpenAPI documentation at:
27
+
28
+
- OpenAPI JSON: http://localhost:8080/v3/api-docs
29
+
30
+
## Features Demonstrated
31
+
32
+
- Integration of springdoc-openapi with Scala classes
33
+
- Automatic schema generation for Scala case classes
34
+
- Support for complex type hierarchies
35
+
- Custom schema customization
36
+
37
+
## Project Structure
38
+
39
+
-`src/main/scala/.../Application.scala` - Spring Boot application entry point
Copy file name to clipboardExpand all lines: examples/springdoc-openapi-scala-2/simple/src/main/scala/za/co/absa/springdocopenapiscala/examples/simple/OpenAPIConfiguration.scala
0 commit comments