Skip to content

Commit

Permalink
Merge 64500f3 into 22dc1b4
Browse files Browse the repository at this point in the history
  • Loading branch information
kibertoad committed Sep 5, 2021
2 parents 22dc1b4 + 64500f3 commit 4cbfca8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ const server = app.listen(serverPort, () => {});
const Koa = require('koa');
const Router = require('koa-router');
const bodyParser = require('koa-bodyparser');
const inputValidation = require('../../src/middleware');
const inputValidation = require('openapi-validator-middleware');
let app = new Koa();
let router = new Router();
app.use(bodyParser());
app.use(router.routes());
module.exports = inputValidation.init('test/pet-store-swagger.yaml', {framework: 'koa'});
module.exports = inputValidation.init('test/pet-store-swagger.yaml', { framework: 'koa' });
router.get('/pets', inputValidation.validate, async (ctx, next) => {
ctx.status = 200;
ctx.body = { result: 'OK' };
Expand All @@ -178,7 +178,7 @@ return app;
```js
'use strict';
const fastify = require('fastify');
const inputValidation = require('../../src/middleware');
const inputValidation = require('openapi-validator-middleware');

async function getApp() {
inputValidation.init('test/pet-store-swagger.yaml', {
Expand Down

0 comments on commit 4cbfca8

Please sign in to comment.