From cdc6fb4413d5193e20e860f9c2967a9e398fecf7 Mon Sep 17 00:00:00 2001 From: Fabian Hiller Date: Fri, 19 Jan 2024 15:08:16 -0500 Subject: [PATCH] Fix bugs in properties.ts files of API reference --- .../src/routes/api/(types)/Enum/properties.ts | 5 +- .../(types)/InvalidActionResult/properties.ts | 47 +++++++++-------- .../api/(types)/ParseInfo/properties.ts | 15 +++--- .../src/routes/api/(types)/Pipe/properties.ts | 51 ++++++++++--------- 4 files changed, 65 insertions(+), 53 deletions(-) diff --git a/website/src/routes/api/(types)/Enum/properties.ts b/website/src/routes/api/(types)/Enum/properties.ts index 104851045..88c393dc1 100644 --- a/website/src/routes/api/(types)/Enum/properties.ts +++ b/website/src/routes/api/(types)/Enum/properties.ts @@ -7,7 +7,10 @@ export const properties: Record = { entries: [ { key: { name: 'key', type: 'string' }, - value: ['string', 'number'], + value: { + type: 'union', + options: ['string', 'number'], + }, }, { key: { name: 'key', type: 'number' }, diff --git a/website/src/routes/api/(types)/InvalidActionResult/properties.ts b/website/src/routes/api/(types)/InvalidActionResult/properties.ts index 5bf28caf0..1b3d0bd51 100644 --- a/website/src/routes/api/(types)/InvalidActionResult/properties.ts +++ b/website/src/routes/api/(types)/InvalidActionResult/properties.ts @@ -13,28 +13,31 @@ export const properties: Record = { name: 'Issue', href: '../Issue/', }, - [ - { - type: 'string', - value: 'validation', - }, - { - type: 'string', - value: 'message', - }, - { - type: 'string', - value: 'input', - }, - { - type: 'string', - value: 'requirement', - }, - { - type: 'string', - value: 'path', - }, - ], + { + type: 'union', + options: [ + { + type: 'string', + value: 'validation', + }, + { + type: 'string', + value: 'message', + }, + { + type: 'string', + value: 'input', + }, + { + type: 'string', + value: 'requirement', + }, + { + type: 'string', + value: 'path', + }, + ], + }, ], }, }, diff --git a/website/src/routes/api/(types)/ParseInfo/properties.ts b/website/src/routes/api/(types)/ParseInfo/properties.ts index 654e4905f..0e01262c4 100644 --- a/website/src/routes/api/(types)/ParseInfo/properties.ts +++ b/website/src/routes/api/(types)/ParseInfo/properties.ts @@ -15,12 +15,15 @@ export const properties: Record = { name: 'Issue', href: '../Issue/', }, - [ - { type: 'string', value: 'origin' }, - { type: 'string', value: 'abortEarly' }, - { type: 'string', value: 'abortPipeEarly' }, - { type: 'string', value: 'skipPipe' }, - ], + { + type: 'union', + options: [ + { type: 'string', value: 'origin' }, + { type: 'string', value: 'abortEarly' }, + { type: 'string', value: 'abortPipeEarly' }, + { type: 'string', value: 'skipPipe' }, + ], + }, ], }, ], diff --git a/website/src/routes/api/(types)/Pipe/properties.ts b/website/src/routes/api/(types)/Pipe/properties.ts index ced62d67a..16e201fd6 100644 --- a/website/src/routes/api/(types)/Pipe/properties.ts +++ b/website/src/routes/api/(types)/Pipe/properties.ts @@ -4,30 +4,33 @@ export const properties: Record = { Pipe: { type: { type: 'array', - item: [ - { - type: 'custom', - name: 'BaseValidation', - href: '../BaseValidation/', - generics: [ - { - type: 'custom', - name: 'TInput', - }, - ], - }, - { - type: 'custom', - name: 'BaseTransformation', - href: '../BaseTransformation/', - generics: [ - { - type: 'custom', - name: 'TInput', - }, - ], - }, - ], + item: { + type: 'union', + options: [ + { + type: 'custom', + name: 'BaseValidation', + href: '../BaseValidation/', + generics: [ + { + type: 'custom', + name: 'TInput', + }, + ], + }, + { + type: 'custom', + name: 'BaseTransformation', + href: '../BaseTransformation/', + generics: [ + { + type: 'custom', + name: 'TInput', + }, + ], + }, + ], + }, }, }, };