From c21e000eea10de73a2f0c1910f67a05a6135e60a Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Wed, 20 Mar 2019 23:41:09 -0400 Subject: [PATCH 1/6] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b26d4b0..5c9141e8 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,17 @@ npm i express-middleware-openapi see [app.ts](test/app.ts) for an example. +### Basic + +```javascript +new OpenApiMiddleware({ + apiSpecPath: './openapi.yaml', + enableObjectCoercion: true, // should be default +}).install(app); +``` + +### Advanced + ```javascript new OpenApiMiddleware({ apiSpecPath: './openapi.yaml', @@ -59,7 +70,6 @@ app.use(express.static(path.join(__dirname, 'public'))); new OpenApiMiddleware({ apiSpecPath: './openapi.yaml', - validateApiDoc: true, // default enableObjectCoercion: true, // will be default }).install(app); From 6f277f60aa81e954289a182b27bff09043cd8ab6 Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Wed, 20 Mar 2019 23:41:45 -0400 Subject: [PATCH 2/6] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5c9141e8..0e9ef11b 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ new OpenApiMiddleware({ }).install(app); ``` +(see complete [example](#example)) + ### Advanced ```javascript From 3f70e4d12423b5f2d8aea0d551f832cd5e07d47d Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Wed, 20 Mar 2019 23:46:02 -0400 Subject: [PATCH 3/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e9ef11b..5ec6eca1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ npm i express-middleware-openapi ## Usage -see [app.ts](test/app.ts) for an example. +see [app.ts](example/app.js) for an example. ### Basic From 8ac7ca26098d80b98c9b5e07a37e657cd0dc2cfc Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Wed, 20 Mar 2019 23:46:29 -0400 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ec6eca1..cea7724b 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ npm i express-middleware-openapi ## Usage -see [app.ts](example/app.js) for an example. +see [app.js](example/app.js) for a complete example. ### Basic From 752dfdca6e884f6fdbfe50b65ad383b8208034be Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Thu, 21 Mar 2019 00:07:08 -0400 Subject: [PATCH 5/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cea7724b..d3bf7057 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # express-middleware-openapi -![](https://travis-ci.org/cdimascio/express-middleware-openapi.svg?branch=master) ![](https://img.shields.io/badge/license-MIT-blue.svg) +![](https://travis-ci.org/cdimascio/express-middleware-openapi.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/github/cdimascio/express-middleware-openapi/badge.svg?branch=master)](https://coveralls.io/github/cdimascio/express-middleware-openapi?branch=master) ![](https://img.shields.io/badge/license-MIT-blue.svg) ExpressJs middleware that automatically validates API requests using an OpenAPI 3.0 specification, From 2ba0fe4190b5d7bb2335a8cc14e814aa2e0de695 Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Thu, 21 Mar 2019 00:07:32 -0400 Subject: [PATCH 6/6] Update README.md --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index d3bf7057..f34632cb 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,6 @@ ExpressJs middleware that automatically validates API requests using an OpenAPI 3.0 specification, -

-
-🚧👷under construction 🚧👷 -

- ## Install Try this pre-release alpha version: