From 2091cce483531e5b1939a86cc17613faaf2fb56e Mon Sep 17 00:00:00 2001 From: Wahab Alshahin Date: Thu, 17 Aug 2023 17:32:14 -0400 Subject: [PATCH] Remove null check for dynamic type in schema generation --- CHANGELOG.md | 4 ++++ lib/src/generators/schema.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47ee31a..5ceb27d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.4.9 + +* Remove null check for dynamic type in schema generation + ## 0.4.8 * Add default value for schema validation constants diff --git a/lib/src/generators/schema.dart b/lib/src/generators/schema.dart index 6dd30db..e7a0b19 100644 --- a/lib/src/generators/schema.dart +++ b/lib/src/generators/schema.dart @@ -441,7 +441,7 @@ class SchemaGenerator extends BaseGenerator { 'dynamic'; c += "$unionName ${nullable ? '?' : ''} $name,\n\n"; } else { - c += "dynamic ${nullable ? '?' : ''} $name,\n\n"; + c += "dynamic $name,\n\n"; } file.writeAsStringSync(c, mode: FileMode.append); }, diff --git a/pubspec.yaml b/pubspec.yaml index 8b19086..facd5b1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: openapi_spec description: OpenAPI Specification generator using native Dart code, as well as an all-in-one parser of existing specifications. -version: 0.4.8 +version: 0.4.9 maintainer: Taza Technology LLC repository: https://github.com/tazatechnology/openapi_spec issue_tracker: https://github.com/tazatechnology/openapi_spec/issues