Skip to content

Commit 5b1fa57

Browse files
committed
Remove confusing info
1 parent ca047e3 commit 5b1fa57

5 files changed

Lines changed: 9 additions & 294 deletions

File tree

generate/extractInfoFromSchema.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export type EndpointInfo = {
1212
rel: string;
1313
name: string;
1414
rawName: string;
15-
returnsCollection: boolean;
1615
urlTemplate: string;
1716
method: string;
1817
comment: string;
@@ -362,9 +361,6 @@ function generateResourceInfo(
362361
: false;
363362

364363
const endpointInfo: EndpointInfo = {
365-
returnsCollection: ['query', 'instances'].some((x) =>
366-
link.rel.includes(x),
367-
),
368364
returnsItem,
369365
requestBodyRequiresItem,
370366
offersNestedItemsOptionInQueryParams:
@@ -441,7 +437,9 @@ function generateResourceInfo(
441437
namespace: toSafeName(
442438
endpoints.some(
443439
(e) =>
444-
e.returnsCollection ||
440+
e.name === 'query' ||
441+
e.name === 'list' ||
442+
e.name.endsWith('List') ||
445443
(e.name === 'find' && e.urlPlaceholders.length === 1),
446444
)
447445
? `${jsonApiType}s`

0 commit comments

Comments
 (0)