Closed
Description
Maybe a silly question but from what I can tell, this library is quite different with version 4. The examples in the docs don't seem to work any more:
[~/git/unsullied] yarn ts-node
yarn run v1.22.19
$ /Users/stbaldwin/git/unsullied/node_modules/.bin/ts-node
> var toJsonSchema = require("@openapi-contrib/openapi-schema-to-json-schema");
undefined
>
undefined
> var schema = {
... type: "string",
... format: "date-time",
... nullable: true,
... };
undefined
>
undefined
> var convertedSchema = toJsonSchema(schema);
/Users/stbaldwin/git/unsullied/<repl>.ts:1
var convertedSchema = toJsonSchema(schema);
^
Uncaught TypeError: toJsonSchema is not a function
at /Users/stbaldwin/git/unsullied/<repl>.ts:1:23
at Script.runInThisContext (node:vm:129:12)
at runInContext (/Users/stbaldwin/git/unsullied/node_modules/ts-node/src/repl.ts:673:19)
at Object.execCommand (/Users/stbaldwin/git/unsullied/node_modules/ts-node/src/repl.ts:639:28)
at /Users/stbaldwin/git/unsullied/node_modules/ts-node/src/repl.ts:661:47
at Array.reduce (<anonymous>)
at appendCompileAndEvalInput (/Users/stbaldwin/git/unsullied/node_modules/ts-node/src/repl.ts:661:23)
at evalCodeInternal (/Users/stbaldwin/git/unsullied/node_modules/ts-node/src/repl.ts:222:12)
at REPLServer.nodeEval (/Users/stbaldwin/git/unsullied/node_modules/ts-node/src/repl.ts:244:26)
at bound (node:domain:433:15)
>
Do you have any docs to help users of 3.x upgrade?
Metadata
Metadata
Assignees
Labels
No labels