Skip to content

Commit

Permalink
1.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Carapacik committed Jan 16, 2025
1 parent 53a90fc commit 528d5da
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
4 changes: 4 additions & 0 deletions swagger_parser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.21.0
- Add support for union types `oneOf`([#265](https://github.com/Carapacik/swagger_parser/issues/265), [#286](https://github.com/Carapacik/swagger_parser/issues/265))
- Fixed config property inheritance

## 1.20.1
- Fixed errors with config parsing

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.20.1
version: 1.21.0
repository: https://github.com/Carapacik/swagger_parser/tree/main/swagger_parser
topics:
- swagger
Expand Down
3 changes: 1 addition & 2 deletions swagger_parser_pages/lib/content/generator_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ class _GeneratorContentState extends State<GeneratorContent> {
height: 48,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFFc92b16)
.withOpacity(0.8),
backgroundColor: const Color(0xb3c92b16),
),
onPressed: () async {
_fileContent.clear();
Expand Down
13 changes: 6 additions & 7 deletions swagger_parser_pages/lib/utils/file_utils.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:convert';
import 'dart:js_interop';
import 'dart:js_interop_unsafe';
import 'dart:typed_data';
Expand All @@ -10,19 +11,17 @@ void generateArchive(List<GeneratedFile> files) {
final encoder = ZipEncoder();
final archive = Archive();
for (final file in files) {
archive.addFile(ArchiveFile(file.name, file.content.length, file.content));
final contentBytes = utf8.encode(file.content);
archive.addFile(ArchiveFile(file.name, contentBytes.length, contentBytes));
}
final outputStream = OutputStream();
final outputStream = OutputMemoryStream();
final bytes = encoder.encode(
archive,
level: Deflate.BEST_COMPRESSION,
level: DeflateLevel.bestCompression,
output: outputStream,
);
if (bytes == null || bytes is! Uint8List) {
throw Exception('Error with encode');
}

final blobWeb = web.Blob(<JSUint8Array>[bytes.toJS].toJS);
final blobWeb = web.Blob(<JSUint8Array>[Uint8List.fromList(bytes).toJS].toJS);
final url = web.URL.createObjectURL(blobWeb);
final anchor = web.document.createElement('a') as web.HTMLAnchorElement
..href = url
Expand Down
12 changes: 6 additions & 6 deletions swagger_parser_pages/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ description: Web interface for swagger_parser
publish_to: none
version: 1.0.0+1
environment:
sdk: '>=3.5.0 <4.0.0'
sdk: '>=3.6.0 <4.0.0'

dependencies:
archive: ^3.6.1
file_picker: ^8.0.7
archive: ^4.0.2
file_picker: ^8.1.7
flutter:
sdk: flutter
flutter_web_plugins:
sdk: flutter
swagger_parser: ^1.18.1
url_launcher: ^6.3.0
swagger_parser: ^1.21.0
url_launcher: ^6.3.1
web:

dev_dependencies:
carapacik_lints: ^1.9.1
carapacik_lints: ^1.10.0

flutter:
uses-material-design: true

0 comments on commit 528d5da

Please sign in to comment.