Skip to content

Commit 5eef2f3

Browse files
committed
Remove schema validator and improve error messages.
1 parent d08df9c commit 5eef2f3

14 files changed

Lines changed: 84 additions & 1711 deletions

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
## ChangeLog for OpenAPI Data Validator
22

3-
## 1.2
3+
## 2.0 ##
4+
* Split out schema validator to reduce bundle size
5+
6+
## 1.2 ##
47
* Add `compile` and `loadCompiled` specs for faster validation

integrationTests/modelValidator.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ class ModelValidator {
1616
async function testValidation() {
1717
const request = {
1818
method: 'POST',
19-
query: {},
19+
query: {
20+
badParameter: 'BadValue'
21+
},
2022
headers: { 'Authorization': 'Bearer AUTH', 'Host': 'test13.api.authress.io', 'User-Agent': 'Amazon CloudFront' },
2123
route: '/v1/invites',
2224
body: {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Ajv from 'ajv';
22
import addFormats from 'ajv-formats';
3-
import { OpenAPIV3, Options } from '../types';
3+
import { OpenAPIV3, Options } from './types';
44

55
export function createRequestAjv(
66
openApiSpec: OpenAPIV3.Document,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
Options,
55
RequestValidatorOptions,
66
ValidateRequestOpts
7-
} from '../types';
7+
} from './types';
88

99
export class AjvOptions {
1010
private options: OpenApiValidatorOpts;

src/framework/index.ts

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/framework/openapi.schema.validator.ts

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/framework/openapi.spec.loader.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)