json-schema-to-typescript
Advanced tools
Comparing version 11.0.5 to 12.0.0
@@ -5,2 +5,6 @@ # Changelog | ||
## 12.0.0 | ||
- b73e1c7 Bugfix: Parse enums as literals, rather than as schemas (#508) | ||
## 11.0.0 | ||
@@ -7,0 +11,0 @@ |
@@ -122,3 +122,3 @@ "use strict"; | ||
params: schema.enum.map(function (_, n) { return ({ | ||
ast: parse(_, options, undefined, processed, usedNames), | ||
ast: parseLiteral(_, undefined), | ||
keyName: schema.tsEnumNames[n] | ||
@@ -215,3 +215,3 @@ }); }), | ||
standaloneName: standaloneName(schema, keyNameFromDefinition, usedNames), | ||
params: schema.enum.map(function (_) { return parse(_, options, undefined, processed, usedNames); }), | ||
params: schema.enum.map(function (_) { return parseLiteral(_, undefined); }), | ||
type: 'UNION' | ||
@@ -218,0 +218,0 @@ }; |
{ | ||
"name": "json-schema-to-typescript", | ||
"version": "11.0.5", | ||
"version": "12.0.0", | ||
"description": "compile json schema to typescript typings", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -170,3 +170,3 @@ import {JSONSchema4Type, JSONSchema4TypeName} from 'json-schema' | ||
params: schema.enum!.map((_, n) => ({ | ||
ast: parse(_, options, undefined, processed, usedNames), | ||
ast: parseLiteral(_, undefined), | ||
keyName: schema.tsEnumNames![n] | ||
@@ -261,3 +261,3 @@ })), | ||
standaloneName: standaloneName(schema, keyNameFromDefinition, usedNames), | ||
params: schema.enum!.map(_ => parse(_, options, undefined, processed, usedNames)), | ||
params: schema.enum!.map(_ => parseLiteral(_, undefined)), | ||
type: 'UNION' | ||
@@ -264,0 +264,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2796337