Skip to content

Commit

Permalink
1.19.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Carapacik committed Oct 14, 2024
1 parent e8f564c commit 1a78d05
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
6 changes: 5 additions & 1 deletion swagger_parser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## 1.19.2
- Fix replacement rules for OpenAPI v2([#266](https://github.com/Carapacik/swagger_parser/issues/266))
- Add `x-nullable` field for null definition in OpenAPI v2([#268](https://github.com/Carapacik/swagger_parser/issues/268))

## 1.19.1
- Fix generation with `anyOf`, `oneOf` and `allOf` properties
- Fix generation with `anyOf`, `oneOf` and `allOf` properties([#260](https://github.com/Carapacik/swagger_parser/issues/260))

## 1.19.0
- Add version getter to root client:
Expand Down
31 changes: 15 additions & 16 deletions swagger_parser/lib/src/parser/model/universal_collections.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,20 @@ enum UniversalCollections {
const UniversalCollections();

/// Returns String representation of collection
String get collectionsString {
return switch (this) {
UniversalCollections.list || UniversalCollections.nullableList => 'List<',
UniversalCollections.map ||
UniversalCollections.nullableMap =>
'Map<String, '
};
}
String get collectionsString => switch (this) {
UniversalCollections.list ||
UniversalCollections.nullableList =>
'List<',
UniversalCollections.map ||
UniversalCollections.nullableMap =>
'Map<String, '
};

String get questionMark {
return switch (this) {
UniversalCollections.nullableList ||
UniversalCollections.nullableMap =>
'?',
UniversalCollections.list || UniversalCollections.map => ''
};
}
/// Returns question mark for collection
String get questionMark => switch (this) {
UniversalCollections.nullableList ||
UniversalCollections.nullableMap =>
'?',
UniversalCollections.list || UniversalCollections.map => ''
};
}
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.19.1
version: 1.19.2
repository: https://github.com/Carapacik/swagger_parser/tree/main/swagger_parser
topics:
- swagger
Expand Down

0 comments on commit 1a78d05

Please sign in to comment.