Skip to content

Commit 3d34561

Browse files
committed
ModelToJsonSchema: is emitted as a path of 'definitions'
1 parent c49152f commit 3d34561

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/model/model-to-json-schema.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ export namespace ModelToJsonSchema {
9898
return { ...schema, patternProperties }
9999
}
100100
function Ref(schema: Types.TRef): Types.TSchema {
101-
return schema
101+
const $ref = schema.$ref
102+
return { ...schema, $ref: `#/definitions/${$ref}` }
102103
}
103104
function This(schema: Types.TThis): Types.TSchema {
104105
return schema

0 commit comments

Comments
 (0)