Skip to content

Commit 04a4efc

Browse files
committed
Split properties and legacyProperties
1 parent 3e43ff6 commit 04a4efc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib/layout/api-route.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export interface ApiRouteResource {
6363
name: string
6464
description: string
6565
properties: ApiRouteProperty[]
66+
legacyProperties?: ApiRouteProperty[]
6667
events: ApiRouteEvent[]
6768
}
6869

@@ -131,10 +132,15 @@ export function setApiRouteLayoutContext(
131132
warnings: resourceWarnings.length > 0,
132133
})
133134

135+
const legacyProperties = properties.find(
136+
({ name }) => name === 'properties',
137+
)?.objectProperties
138+
134139
file.resources.push({
135140
name: resource.resourceType,
136141
description: resource.description,
137-
properties,
142+
properties: properties.filter(({ name }) => name !== 'properties'),
143+
...(legacyProperties == null ? {} : { legacyProperties }),
138144
errors: resourceErrors,
139145
warnings: resourceWarnings,
140146
events: eventsByRoutePath.get(resource.routePath) ?? [],

0 commit comments

Comments
 (0)