forked from bug-hunters/oas3-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from natura-cosmeticos/custom-middleware
Custom middleware
- Loading branch information
Showing
4 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
This is a forked project from https://github.com/apigee-127/swagger-tools with an attemp to add Open API 3 support. :) | ||
|
||
## Warning | ||
This package was generated due to slowness of PR merging in original repo [bug-hunters/oas3-tools](https://github.com/bug-hunters/oas3-tools). | ||
|
||
We needed the custom-middlewares feature so we've forked temporary. | ||
|
||
We do not encourage using this package, cause once the original library merges this feature, we'll exclude the duplicate package here. | ||
|
||
## Features included in this package (since fork) | ||
* [feat(custom-middleware): added support of custom middlewares binding #47 | ||
](https://github.com/bug-hunters/oas3-tools/pull/47) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "oas3-tools", | ||
"version": "2.2.0", | ||
"name": "@naturacosmeticos/oas3-tools", | ||
"version": "1.0.0", | ||
"description": "Swagger-UI and API Rest Routing for Open API v3.", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
|
@@ -14,11 +14,11 @@ | |
"bugs": { | ||
"url": "https://github.com/bug-hunters/oas3-tools/issues" | ||
}, | ||
"homepage": "https://github.com/bug-hunters/oas3-tools", | ||
"homepage": "https://github.com/natura-cosmeticos/oas3-tools", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:bug-hunters/oas3-tools.git" | ||
"url": "[email protected]:natura-cosmeticos/oas3-tools.git" | ||
}, | ||
"keywords": [ | ||
"api", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
'use strict'; | ||
import { ExpressAppConfig } from "./middleware/express.app.config"; | ||
import { Oas3AppOptions } from "./middleware/oas3.options"; | ||
import { OpenApiRequestHandler } from 'express-openapi-validator/dist/framework/types' | ||
|
||
export function expressAppConfig(definitionPath: string, appOptions: Oas3AppOptions): ExpressAppConfig { | ||
return new ExpressAppConfig(definitionPath, appOptions); | ||
export function expressAppConfig( | ||
definitionPath: string, | ||
appOptions: Oas3AppOptions, | ||
customMiddlewares?: OpenApiRequestHandler[] | ||
): ExpressAppConfig { | ||
return new ExpressAppConfig(definitionPath, appOptions, customMiddlewares); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters