Skip to content

Commit

Permalink
1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Carapacik committed Oct 14, 2023
1 parent 8c7d466 commit eb41ddd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 5 additions & 4 deletions swagger_parser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ dependencies:
# dio: ^5.3.0
# freezed_annotation: ^2.4.1 # for freezed
# json_annotation: ^4.8.1
# retrofit: ^4.0.2
# retrofit: ^4.0.3

dev_dependencies:
# build_runner: ^2.4.6
# freezed: ^2.4.3 # for freezed
# freezed: ^2.4.5 # for freezed
# json_serializable: ^6.7.1
# retrofit_generator: ^8.0.0
# retrofit_generator: ^8.0.1
swagger_parser:
```
Expand All @@ -52,6 +52,7 @@ swagger_parser:
# Sets the OpenApi schema path directory for api definition.
schema_path: schemas/openapi.json
# Sets the url of the OpenApi schema
schema_url: https://petstore.swagger.io/v2/swagger.json
Expand All @@ -64,7 +65,7 @@ swagger_parser:
# Optional. If 'schema_path' and 'schema_url' are specified, what will be used.
# Current available options are: path, url.
prefer_schema_source: url
prefer_schema_source: path
# Optional (dart only). Set 'true' to generate data classes using freezed package.
freezed: false
Expand Down
2 changes: 2 additions & 0 deletions swagger_parser/lib/src/parser/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,10 @@ class OpenApiParser {
else if (map.containsKey(_typeConst) &&
map[_typeConst] == _objectConst &&
(map.containsKey(_propertiesConst) &&
(map[_propertiesConst] is Map<String, dynamic>) &&
(map[_propertiesConst] as Map<String, dynamic>).isNotEmpty) ||
(map.containsKey(_additionalPropertiesConst) &&
(map[_additionalPropertiesConst] is Map<String, dynamic>) &&
(map[_additionalPropertiesConst] as Map<String, dynamic>)
.isNotEmpty)) {
// false positive result
Expand Down
2 changes: 1 addition & 1 deletion swagger_parser/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: swagger_parser
description: Package that generates REST clients and data classes from OpenApi definition file
version: 1.9.2
version: 1.10.0
repository: https://github.com/Carapacik/swagger_parser/tree/main/swagger_parser
homepage: https://omega-r.com
topics:
Expand Down

0 comments on commit eb41ddd

Please sign in to comment.