@openapi-generator-plus/typescript-generator-common
Advanced tools
Comparing version
@@ -246,4 +246,7 @@ "use strict"; | ||
} | ||
else if (typeof value === 'object') { | ||
return JSON.stringify(value); | ||
} | ||
else { | ||
context.log(types_1.CodegenLogLevel.WARN, `Literal is unsupported for schema type object: ${JSON.stringify(value)}`); | ||
context.log(types_1.CodegenLogLevel.WARN, `Literal value of type ${typeof value} is unsupported for schema type object: ${JSON.stringify(value)}`); | ||
return 'null'; | ||
@@ -250,0 +253,0 @@ } |
{ | ||
"name": "@openapi-generator-plus/typescript-generator-common", | ||
"version": "0.22.3", | ||
"version": "0.22.4", | ||
"description": "A common OpenAPI Generator+ module for TypeScript generators", | ||
@@ -25,5 +25,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@openapi-generator-plus/generator-common": "^0.18.0", | ||
"@openapi-generator-plus/handlebars-templates": "^0.19.0", | ||
"@openapi-generator-plus/java-like-generator-helper": "^0.15.2" | ||
"@openapi-generator-plus/generator-common": "^0.19.0", | ||
"@openapi-generator-plus/handlebars-templates": "^0.20.0", | ||
"@openapi-generator-plus/java-like-generator-helper": "^0.15.3" | ||
}, | ||
@@ -30,0 +30,0 @@ "publishConfig": { |
@@ -277,4 +277,6 @@ import { CodegenSchemaType, CodegenGeneratorContext, CodegenGenerator, CodegenConfig, CodegenDocument, CodegenAllOfStrategy, CodegenAnyOfStrategy, CodegenOneOfStrategy, CodegenLogLevel, isCodegenOneOfSchema, isCodegenAnyOfSchema, isCodegenInterfaceSchema, isCodegenObjectSchema } from '@openapi-generator-plus/types' | ||
return value | ||
} else if (typeof value === 'object') { | ||
return JSON.stringify(value) | ||
} else { | ||
context.log(CodegenLogLevel.WARN, `Literal is unsupported for schema type object: ${JSON.stringify(value)}`) | ||
context.log(CodegenLogLevel.WARN, `Literal value of type ${typeof value} is unsupported for schema type object: ${JSON.stringify(value)}`) | ||
return 'null' | ||
@@ -281,0 +283,0 @@ } |
62509
0.44%1044
0.48%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated