File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ declare namespace OpenapiSchemaToJsonSchema {
2
+ interface Options {
3
+ dateToDateTime ?: boolean ;
4
+ cloneSchema ?: boolean ;
5
+ supportPatternProperties ?: boolean ;
6
+ keepNotSupported ?: NotSupported [ ] ;
7
+ strictMode ?: boolean ;
8
+ }
9
+ type NotSupported =
10
+ | "nullable"
11
+ | "discriminator"
12
+ | "readOnly"
13
+ | "writeOnly"
14
+ | "xml"
15
+ | "externalDocs"
16
+ | "example"
17
+ | "deprecated" ;
18
+
19
+ function fromSchema < T = Record < string | number , any > > (
20
+ schema : Record < string | number , any > ,
21
+ options ?: Options
22
+ ) : T ;
23
+ function fromParameter < T = Record < string | number , any > > (
24
+ parameter : Record < string | number , any > ,
25
+ options ?: Options
26
+ ) : T ;
27
+ }
28
+ declare function OpenapiSchemaToJsonSchema < T = Record < string | number , any > > (
29
+ schema : Record < string | number , any > ,
30
+ options ?: OpenapiSchemaToJsonSchema . Options
31
+ ) : T ;
32
+ export = OpenapiSchemaToJsonSchema ;
Original file line number Diff line number Diff line change 3
3
"version" : " 0.0.0-development" ,
4
4
"description" : " Converts OpenAPI Schema Object to JSON Schema" ,
5
5
"main" : " index.js" ,
6
+ "types" : " index.d.ts" ,
6
7
"scripts" : {
7
8
"pretest" : " npm run lint" ,
8
9
"test" : " tape test/**/*.test.js | tap-spec" ,
You can’t perform that action at this time.
0 commit comments