Skip to content

Commit

Permalink
Development (#682)
Browse files Browse the repository at this point in the history
* Fixed some issues

* formatted code

* updated SDK

* Updated SDK and version

* Fixed generation of lists of classes

* Fixed generation $Items classes

* Updated pubspec and changelog

* Fixed #524

* Fixed #598 Generation of query enum parameters

* Fixed conflicts

* Fixed some issues in swaggers

* Updated changelog and pubspec

* Fix #583, #637, #619 and update readme (#638)

* fix #583 and update readme

* fix #637

* fix #619

* Fixed generation of some fields

* Removed test

* Fixed classes named List

* Fixed generation of query parameters with ref default type

* Fixed generation of DateTime parameters

* Fixed generation of responses in some cases

* Some fixes

* Updated changelog and pubspec

* Implemented not nullable fields

* Fixed tests

* fixed generation of some swaggers

* Added ability to return String values

* Returned main.dart content

* Updated pubspec and changelog

* Fixed generation of required and not required fields

* Added check for object ref in body

* Fixed some things

* Fixed tests

* Fixed tests

* Fixed some things

* Updated changelog and pubspec

* Removed not needed lines in tests

* Fixed generation of nullable responses

* Added generation of DateTime

* Updated pubspec and changelog

* Fixed tests

* Fixed #669 Generation models from content schema allof

* Fixed #665 generation putIfAbsent for response from content schema

* Fixed generation of nullable and required properties

* Fixed tests

* Fixed some stuff related to nullable properties

* Updated changelog and pubspec

* Formatted code

* Formatted code

* Fixed tests

* Fixed generation of some enums inside classes

* Implemented support of exploded parameters

* Pushed constants file

* Fixed generation of allOf for request bodies

* Implemented overriden_models functionality

* Improved overriden models logic

* Fixed tests

---------

Co-authored-by: Uladzimir Paliukhovich <[email protected]>
Co-authored-by: Romain <[email protected]>
  • Loading branch information
3 people authored Nov 22, 2023
1 parent 7150e32 commit 4535adc
Show file tree
Hide file tree
Showing 23 changed files with 923 additions and 438 deletions.
6 changes: 5 additions & 1 deletion example/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ targets:
additional_headers:
- "Cache-Control"
overriden_models:
- "Order"
- file_name: "pet_service_json"
import_url: "../overriden_models.dart"
overriden_models:
- "Pet"
- "Order"
separate_models: false
enums_case_sensitive: false
cut_from_model_names: "ModelRenameV3"
Expand Down
11 changes: 11 additions & 0 deletions example/lib/overriden_models.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class Pet {
static Pet fromJsonFactory(Map<String, dynamic> json) {
throw UnimplementedError();
}
}

class Order {
static Order fromJsonFactory(Map<String, dynamic> json) {
throw UnimplementedError();
}
}
2 changes: 2 additions & 0 deletions example/lib/swagger_generated_code/client_index.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export 'pet_service_json.swagger.dart' show PetServiceJson;
export 'pet_service_json.swagger.dart' show PetServiceJson;
export 'pet_service_swagger.swagger.dart' show PetServiceSwagger;
export 'pet_service_yaml.swagger.dart' show PetServiceYaml;
export 'pet_service_yaml.swagger.dart' show PetServiceYaml;
9 changes: 0 additions & 9 deletions example/lib/swagger_generated_code/overriden_models.dart

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:collection/collection.dart';

enum OrderStatus {
@JsonValue(null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class _$PetServiceJson extends PetServiceJson {

@override
Future<Response<List<Pet>>> _petFindByStatusGet({
required String? status,
required List<Object?>? status,
String? cacheControl,
}) {
final Uri $url = Uri.parse('/pet/findByStatus');
Expand Down
Loading

0 comments on commit 4535adc

Please sign in to comment.