Skip to content

Commit

Permalink
4.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dankinsoid committed May 4, 2024
1 parent 680c8ad commit 7096757
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ VaporToOpenAPI is a Swift library which can generate output compatible with [Ope
The library is based on [SwiftOpenAPI](https://github.com/dankinsoid/SwiftOpenAPI).

## Usage
### Base usage

### [Stoplight](https://stoplight.io) setup
1. Add a route via the `routes.stoplightDocumentation` to return an `OpenAPIObject` instance via the `routes.openAPI` method.

### [Swagger](https://swagger.io) setup
1. Set up a [SwaggerUI page](https://github.com/swagger-api/swagger-ui) in your Vapor project downloading the `dist` folder and placing its content in the `Public/Swagger` directory.
2. Describe all of your routes and register all controllers as described in [Vapor docs](https://docs.vapor.codes/basics/routing). Add OpenAPI details to each route using the `route.openAPI` method.
3. Add a route to return a [SwaggerUI index.html](https://github.com/swagger-api/swagger-ui/blob/master/dist/index.html). Or configure your middlewares to use 'index.html' as default page.
Expand Down Expand Up @@ -213,7 +217,7 @@ import PackageDescription
let package = Package(
name: "SomeProject",
dependencies: [
.package(url: "https://github.com/dankinsoid/VaporToOpenAPI.git", from: "4.6.0")
.package(url: "https://github.com/dankinsoid/VaporToOpenAPI.git", from: "4.6.1")
],
targets: [
.target(name: "SomeProject", dependencies: ["VaporToOpenAPI"])
Expand Down

0 comments on commit 7096757

Please sign in to comment.