make edit and add schema order consistent

This commit is contained in:
Ruben Fiszel
2025-04-21 14:39:21 +02:00
parent 989a4f7e61
commit 941adea42a
2 changed files with 3 additions and 3 deletions
@@ -153,9 +153,7 @@
viewJsonSchema = false
try {
schema = resourceTypeInfo.schema as any
schema.order = schema.order ?? Object.keys(schema.properties).sort()
notFound = false
} catch (e) {
notFound = true
@@ -118,6 +118,8 @@
resourceTypeInfo = resourceType
if (resourceType.schema) {
resourceSchema = resourceType.schema as Schema
resourceSchema.order =
resourceSchema.order ?? Object.keys(resourceSchema.properties).sort()
}
if (resourceTypeInfo?.format_extension) {
textFileContent = args.content
@@ -237,7 +239,7 @@
}}
/>
</div>
<div class="text-sm">
<div>
{#if loadingSchema}
<Skeleton layout={[[4]]} />
{:else if !viewJsonSchema && resourceSchema && resourceSchema?.properties}