Skip to content

Commit

Permalink
fix: show description when running workspace generators/schematics (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammisuli authored Jan 21, 2022
1 parent b6cfdbf commit 776d2a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libs/server/src/lib/utils/get-generators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ async function readWorkspaceGeneratorsCollection(
.filter((f) => basename(f) === 'schema.json')
.map(async (f) => {
const schemaJson = await readAndCacheJsonFile(f, '');
const name = schemaJson.json.id || schemaJson.json.$id;
const name =
schemaJson.json.title || schemaJson.json.id || schemaJson.json.$id;
const type: GeneratorType =
schemaJson.json['x-type'] ?? GeneratorType.Other;
return {
Expand All @@ -87,7 +88,7 @@ async function readWorkspaceGeneratorsCollection(
name,
collection: collectionName,
options: await normalizeSchema(schemaJson.json),
description: '',
description: schemaJson.json.description ?? '',
type,
},
} as CollectionInfo;
Expand Down

0 comments on commit 776d2a4

Please sign in to comment.