From 0f911615c9e924a721801d452e17cb26473754f1 Mon Sep 17 00:00:00 2001 From: Jeff Peiffer Date: Wed, 15 Nov 2023 19:51:26 -0500 Subject: [PATCH] Checkpoint --- bin/process_schemas.dart | 42 ++++++++++++++++++---------------------- pubspec.yaml | 3 ++- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/bin/process_schemas.dart b/bin/process_schemas.dart index 0967941..569345e 100644 --- a/bin/process_schemas.dart +++ b/bin/process_schemas.dart @@ -70,33 +70,29 @@ void main(List args) { 'https://peiffer-innovations.github.io/flutter_json_schemas/schemas/json_dynamic_widget/json_widget_data.json') { dataSchema = file; } else { - if (children == null) { - print('[OBJECT]: $type'); - } else { - print('[WIDGET]: $type'); - schemas[id] = schema; - oneOf.add( - { - 'type': 'object', - 'additionalProperties': false, + print('[WIDGET]: $type'); + schemas[id] = schema; + oneOf.add( + { + 'type': 'object', + 'additionalProperties': false, + 'properties': { + ...properties, + if (children == 1) 'child': child, + if (children == -1) 'children': children, 'properties': { - ...properties, - if (children == 1) 'child': child, - if (children == -1) 'children': children, - 'properties': { - 'args': { - r'$ref': id, - }, - 'type': { - 'type': 'string', - 'const': type.substring(0, type.indexOf('.')), - }, + 'args': { + r'$ref': id, + }, + 'type': { + 'type': 'string', + 'const': type.substring(0, type.indexOf('.')), }, }, }, - ); - } - } + }, + ); + } } oneOf.add({ 'type': 'object', diff --git a/pubspec.yaml b/pubspec.yaml index 2e7a1ca..6bb48f1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: json_class: '^3.0.0' - yaon: '^1.1.0' + yaon: '^1.1.4' dev_dependencies: flutter_lints: '^2.0.1' @@ -38,5 +38,6 @@ ignore_updates: - 'term_glyph' - 'test_api' - 'typed_data' + - 'uuid' - 'vector_math' - 'webdriver'