@ovotech/laminar-cli
Advanced tools
Comparing version 0.13.17 to 0.13.18
@@ -36,4 +36,6 @@ "use strict"; | ||
return (0, ts_compose_1.mapWithContext)(context, parameters, (context, param) => { | ||
const astParams = param.schema ? (0, convert_schema_1.convertSchema)(context, param.schema) : (0, ts_compose_1.document)(context, ts_compose_1.Type.Unknown); | ||
return (0, ts_compose_1.document)(astParams.context, ts_compose_1.Type.Prop({ | ||
const astParams = param.schema | ||
? (0, convert_schema_1.convertSchema)({ ...context, optionalDefaults: true }, param.schema) | ||
: (0, ts_compose_1.document)(context, ts_compose_1.Type.Unknown); | ||
return (0, ts_compose_1.document)({ ...astParams.context, optionalDefaults: context.optionalDefaults }, ts_compose_1.Type.Prop({ | ||
name: param.in === 'header' ? param.name.toLowerCase() : param.name, | ||
@@ -99,5 +101,4 @@ type: astParams.type, | ||
const pathApi = (0, traverse_1.getReferencedObject)(methodsApiOrRef, traverse_1.isSchemaObject, 'schema', context); | ||
const methods = (0, ts_compose_1.mapWithContext)(pathContext, Object.entries(pathApi), (methodContextOriginal, [method, operation]) => { | ||
const methods = (0, ts_compose_1.mapWithContext)(pathContext, Object.entries(pathApi), (methodContext, [method, operation]) => { | ||
var _a; | ||
const methodContext = { ...methodContextOriginal, optionalDefaults: true }; | ||
const combinedParameters = [...(parameters !== null && parameters !== void 0 ? parameters : []), ...((_a = operation.parameters) !== null && _a !== void 0 ? _a : [])].map((item) => (0, traverse_1.getReferencedObject)(item, traverse_1.isParameterObject, 'parameter', methodContext)); | ||
@@ -104,0 +105,0 @@ const requestName = `${method.toUpperCase()} ${path}`; |
@@ -15,3 +15,3 @@ "use strict"; | ||
.createCommand('laminar') | ||
.version('0.13.17') | ||
.version('0.13.18') | ||
.description(`Laminar CLI - a tool for converting OpenApi and Avro Schemas to appropriate typescript types | ||
@@ -18,0 +18,0 @@ |
{ | ||
"name": "@ovotech/laminar-cli", | ||
"version": "0.13.17", | ||
"version": "0.13.18", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
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
108601
1833