@keq-request/cli 5.0.0-alpha.14 → 5.0.0-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1284,11 +1284,13 @@ async function jsonSchemaRenderer(schemaDefinition) {
1284
1284
  ].filter(R12.isNotNil).join("\n");
1285
1285
  }
1286
1286
  if (JsonSchemaUtils.isNonArray(schemaDefinition.schema) && schemaDefinition.schema.type === "object") {
1287
+ const $schema = generateSchema(schemaDefinition.schema);
1288
+ const $declaration = $schema.startsWith("{") ? `export interface ${schemaDefinition.name} ${$schema}` : `export type ${schemaDefinition.name} = ${$schema}`;
1287
1289
  return [
1288
1290
  "/* @anchor:file:start */",
1289
1291
  "",
1290
1292
  $comment || void 0,
1291
- `export interface ${schemaDefinition.name} ${generateSchema(schemaDefinition.schema)}`,
1293
+ $declaration,
1292
1294
  "",
1293
1295
  "/* @anchor:file:end */"
1294
1296
  ].filter(R12.isNotNil).join("\n");