Skip to content

Commit 4f13112

Browse files
committed
feature: updated generator versions
1 parent 9da6858 commit 4f13112

File tree

26 files changed

+438718
-179
lines changed

26 files changed

+438718
-179
lines changed

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: [buymeacoffee.com/gibahjoe]

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ jobs:
5252
credential: ${{ secrets.PUB_CREDENTIAL_JSON }}
5353
package_directory: ./openapi-generator
5454
flutter_package: true
55-
skip_test: true
55+
skip_test: false
5656
dry_run: false

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ or
7474
```shell
7575
flutter pub run build_runner build --delete-conflicting-outputs
7676
```
77-
to generate open api client sdk from spec file specified in annotation.
77+
to generate open api client sdk from spec file specified in annotation.
7878
The api sdk will be generated in the folder specified in the annotation. See examples for more details
7979

80-
81-
8280
## Features and bugs
8381

8482
Please file feature requests and bugs at the [issue tracker][tracker].
8583

8684
[tracker]: https://github.com/gibahjoe/openapi-generator-dart/issues
85+
86+
<a href="https://www.buymeacoffee.com/gibahjoe" target="_blank"><img src="https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>

example/api/petstore_api/pubspec.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void main() {
77

88
@Openapi(
99
additionalProperties:
10-
DioProperties(pubName: 'petstore_api', pubAuthor: 'Johnny dep...'),
10+
DioProperties(pubName: 'petstore_api', pubAuthor: 'Johnny dep..'),
1111
inputSpecFile: 'openapi-spec.yaml',
1212
typeMappings: {'Pet': 'ExamplePet'},
1313
generatorName: Generator.dio,

openapi-generator-annotations/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 4.11.0
2+
3+
- Bumped dart-ogurets (_dioAlt_) generator to 7.2
4+
with [changes](https://github.com/dart-ogurets/dart-openapi-maven#changelog)
5+
- Bumped official openapi generator to 6.6.0.
6+
See [change log](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.4.0)
7+
- fix endpoints returning null [#15433](https://github.com/OpenAPITools/openapi-generator/pull/15433)
8+
- Drop default value when unnecessary [#15368](https://github.com/OpenAPITools/openapi-generator/pull/15368)
9+
110
## 4.10.0
211

312
- Bumped dart-ogurets (_dioAlt_) generator to 7.1

openapi-generator-annotations/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,15 @@ Then in generatedsources/.openapi-generator-ignore, add the below so that the pu
6868
```.gitignore
6969
pubspec.yaml
7070
```
71-
The above steps are usefull when you have issues with dependency conflicts, clashes. You can even use it to upgrade the library packages in the generated source.
7271

72+
The above steps are usefull when you have issues with dependency conflicts, clashes. You can even use it to upgrade the
73+
library packages in the generated source.
7374

7475
## Features and bugs
7576

7677
Please file feature requests and bugs at the [issue tracker][tracker].
7778

7879
[tracker]: https://github.com/gibahjoe/openapi-generator-dart/issues
80+
81+
82+
<a href="https://www.buymeacoffee.com/gibahjoe" target="_blank"><img src="https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>

openapi-generator-annotations/lib/src/openapi_generator_annotations_base.dart

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ class Openapi {
88
/// --additional-properties
99
final AdditionalProperties? additionalProperties;
1010

11+
// /// Allows you to customize how inline schemas are handled or named
12+
// ///
13+
// /// --inline-schema-options
14+
// final InlineSchemaOptions? inlineSchemaOptions;
15+
1116
/// The package of the api. defaults to lib.api
1217
///
1318
/// --api-package
@@ -80,6 +85,15 @@ class Openapi {
8085
/// e.g {'OffsetDate': 'package:time_machine/time_machine.dart'}
8186
final Map<String, String>? importMappings;
8287

88+
/// Inline schemas are created as separate schemas automatically and the
89+
/// auto-generated schema name may not look good to everyone. One can customize
90+
/// the name using the title field or the inlineSchemaNameMapping option.
91+
///
92+
/// --inline-schema-name-mappings
93+
///
94+
/// e.g {'inline_object_2': 'SomethingMapped'}
95+
final Map<String, String>? inlineSchemaNameMappings;
96+
8397
const Openapi(
8498
{this.additionalProperties,
8599
this.overwriteExistingFiles,
@@ -91,6 +105,8 @@ class Openapi {
91105
this.typeMappings,
92106
this.importMappings,
93107
this.reservedWordsMappings,
108+
this.inlineSchemaNameMappings,
109+
// this.inlineSchemaOptions,
94110
this.apiPackage,
95111
this.fetchDependencies = true,
96112
this.runSourceGenOnOutput = true,
@@ -173,44 +189,30 @@ class AdditionalProperties {
173189
this.wrapper = Wrapper.none});
174190
}
175191

176-
class JaguarProperties extends AdditionalProperties {
177-
/// Choose serialization format JSON or PROTO is supported
178-
final SerializationFormat? serialization;
192+
/// Allows you to customize how inline schemas are handled or named
193+
class InlineSchemaOptions {
194+
/// sets the array item suffix
195+
final String? arrayItemSuffix;
179196

180-
/// Is the null fields should be in the JSON payload
181-
final bool? nullableFields;
197+
/// set the map item suffix
198+
final String? mapItemSuffix;
182199

183-
const JaguarProperties(
184-
{this.serialization,
185-
this.nullableFields,
186-
bool allowUnicodeIdentifiers = false,
187-
bool ensureUniqueParams = true,
188-
bool prependFormOrBodyParameters = false,
189-
String? pubAuthor,
190-
String? pubAuthorEmail,
191-
String? pubDescription,
192-
String? pubHomepage,
193-
String? pubName,
194-
String? pubVersion,
195-
bool sortModelPropertiesByRequiredFlag = true,
196-
bool sortParamsByRequiredFlag = true,
197-
bool useEnumExtension = true,
198-
String? sourceFolder})
199-
: super(
200-
allowUnicodeIdentifiers: allowUnicodeIdentifiers,
201-
ensureUniqueParams: ensureUniqueParams,
202-
prependFormOrBodyParameters: prependFormOrBodyParameters,
203-
pubAuthor: pubAuthor,
204-
pubAuthorEmail: pubAuthorEmail,
205-
pubDescription: pubDescription,
206-
pubHomepage: pubHomepage,
207-
pubName: pubName,
208-
pubVersion: pubVersion,
209-
sortModelPropertiesByRequiredFlag:
210-
sortModelPropertiesByRequiredFlag,
211-
sortParamsByRequiredFlag: sortParamsByRequiredFlag,
212-
sourceFolder: sourceFolder,
213-
useEnumExtension: useEnumExtension);
200+
/// special value to skip reusing inline schemas during refactoring
201+
final bool skipSchemaReuse;
202+
203+
/// will restore the 6.x (or below) behaviour to refactor allOf inline schemas
204+
///into $ref. (v7.0.0 will skip the refactoring of these allOf inline schmeas by default)
205+
final bool refactorAllofInlineSchemas;
206+
207+
/// Email address of the author in generated pubspec
208+
final bool resolveInlineEnums;
209+
210+
const InlineSchemaOptions(
211+
{this.arrayItemSuffix,
212+
this.mapItemSuffix,
213+
this.skipSchemaReuse = true,
214+
this.refactorAllofInlineSchemas = true,
215+
this.resolveInlineEnums = true});
214216
}
215217

216218
class DioProperties extends AdditionalProperties {

openapi-generator-annotations/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: openapi_generator_annotations
22
description: Annotation package for openapi_generator https://pub.dev/packages/openapi_generator.
3-
version: 4.10.0
3+
version: 4.11.0
44
homepage: https://github.com/gibahjoe/openapi-generator-dart
55

66

openapi-generator-cli/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 4.11.0
2+
3+
- Bumped dart-ogurets (_dioAlt_) generator to 7.2
4+
with [changes](https://github.com/dart-ogurets/dart-openapi-maven#changelog)
5+
- Bumped official openapi generator to 6.6.0.
6+
See [change log](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0)
7+
- fix endpoints returning null [#15433](https://github.com/OpenAPITools/openapi-generator/pull/15433)
8+
- Drop default value when unnecessary [#15368](https://github.com/OpenAPITools/openapi-generator/pull/15368)
9+
110
## 4.10.0
211

312
- Bumped dart-ogurets (_dioAlt_) generator to 7.1

0 commit comments

Comments
 (0)