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

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/cli.js CHANGED
@@ -1285,11 +1285,13 @@ async function jsonSchemaRenderer(schemaDefinition) {
1285
1285
  ].filter(R12.isNotNil).join("\n");
1286
1286
  }
1287
1287
  if (JsonSchemaUtils.isNonArray(schemaDefinition.schema) && schemaDefinition.schema.type === "object") {
1288
+ const $schema = generateSchema(schemaDefinition.schema);
1289
+ const $declaration = $schema.startsWith("{") ? `export interface ${schemaDefinition.name} ${$schema}` : `export type ${schemaDefinition.name} = ${$schema}`;
1288
1290
  return [
1289
1291
  "/* @anchor:file:start */",
1290
1292
  "",
1291
1293
  $comment || void 0,
1292
- `export interface ${schemaDefinition.name} ${generateSchema(schemaDefinition.schema)}`,
1294
+ $declaration,
1293
1295
  "",
1294
1296
  "/* @anchor:file:end */"
1295
1297
  ].filter(R12.isNotNil).join("\n");