Skip to content

Commit 74e6c70

Browse files
committed
fix: validator declarations
1 parent aca36b3 commit 74e6c70

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

packages/openapi-code-generator/src/core/openapi-validator.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
import type {ErrorObject} from "ajv"
21
import {logger} from "./logger"
3-
4-
import validate3_0 = require("./schemas/openapi-3.0-specification-validator")
5-
import validate3_1 = require("./schemas/openapi-3.1-specification-validator")
6-
7-
interface ValidateFunction {
8-
(data: unknown): boolean
9-
10-
errors?: null | ErrorObject[]
11-
}
2+
import type {ValidateFunction} from "./schemas/IValidateFunction"
3+
import validate3_0 from "./schemas/openapi-3.0-specification-validator"
4+
import validate3_1 from "./schemas/openapi-3.1-specification-validator"
125

136
export class OpenapiValidator {
147
private constructor(
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type {ErrorObject} from "ajv"
2+
3+
export interface ValidateFunction {
4+
(data: unknown): boolean
5+
6+
errors?: null | ErrorObject[]
7+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import {ValidateFunction} from "./IValidateFunction"
2+
3+
declare const Validator: ValidateFunction
4+
export default Validator
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import {ValidateFunction} from "./IValidateFunction"
2+
3+
declare const Validator: ValidateFunction
4+
export default Validator

0 commit comments

Comments
 (0)