Skip to content

Commit 9bdff08

Browse files
committed
upgrade deps in default test
2 parents 8ff6622 + e1aed29 commit 9bdff08

58 files changed

Lines changed: 1903 additions & 81 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/linux.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
- master
1111
- '[5-9]+.[0-9]+.x'
1212

13-
env:
14-
GRADLE_VERSION: '8.14.3'
15-
1613
jobs:
1714
build:
1815
name: 'Build: JDK ${{ matrix.java }} (${{ matrix.os }})'
@@ -47,6 +44,10 @@ jobs:
4744
restore-keys: |
4845
${{ runner.os }}-gradle-
4946
47+
- uses: gradle/actions/setup-gradle@v3
48+
with:
49+
gradle-version: '8.14.3'
50+
5051
- name: Setup Maven
5152
uses: s4u/setup-maven-action@v1.18.0
5253
with:
@@ -69,8 +70,6 @@ jobs:
6970
- name: Test Gradle plugin usage
7071
shell: bash
7172
run: gradle --project-dir modules/openapi-generator-gradle-plugin/samples/local-spec buildGoSdk --stacktrace
72-
with:
73-
gradle-version: ${{ env.GRADLE_VERSION }}
7473

7574
- name: Test Maven plugin integration
7675
if: matrix.java == '11'

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,12 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert
576576
// inner items e.g. enums in collections, only works for one level
577577
// but same is the case for DefaultCodegen
578578
property.setDatatypeWithEnum(property.datatypeWithEnum.replace(property.items.datatypeWithEnum, enumName));
579+
// Because properties are cached in org.openapitools.codegen.DefaultCodegen.fromProperty(java.lang.String, io.swagger.v3.oas.models.media.Schema, boolean, boolean)
580+
// then the same object could be for multiple properties where the name of the inline enum is the same
581+
// in 2 different classes and the following renaming will impact properties in other classes we
582+
// therefore clone them before editing
583+
property.items = property.items.clone();
584+
property.mostInnerItems = property.items;
579585
property.items.setDatatypeWithEnum(enumName);
580586
property.items.setEnumName(enumName);
581587
} else {

modules/openapi-generator/src/main/resources/typescript/package.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
{{#platforms}}
6363
{{#node}}
6464
"@types/node": "^16.18.126",
65-
"form-data": "^2.5.0",
65+
"form-data": "^4.0.4",
6666
{{/node}}
6767
{{/platforms}}
6868
{{#useRxJS}}

modules/openapi-generator/src/test/resources/3_0/dart/petstore-with-fake-endpoints-models-for-testing.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,6 +1303,19 @@ paths:
13031303
responses:
13041304
200:
13051305
description: The instance started successfully
1306+
/fake/duplicate-inline-enums:
1307+
get:
1308+
tags:
1309+
- fake
1310+
summary: test objects with duplicate inline enums see issue# 21582
1311+
operationId: fake-duplicate-inline-enum
1312+
responses:
1313+
'200':
1314+
description: OK
1315+
content:
1316+
application/json:
1317+
schema:
1318+
$ref: '#/components/schemas/ObjectThatReferencesObjectsWithDuplicateInlineEnums'
13061319
servers:
13071320
- url: 'http://{server}.swagger.io:{port}/v2'
13081321
description: petstore server
@@ -2081,3 +2094,36 @@ components:
20812094
$ref: '#/components/schemas/TestEnum'
20822095
default: ""
20832096
title: TestItem
2097+
ObjectWithInlineEnum:
2098+
type: object
2099+
properties:
2100+
attribute:
2101+
description: 'Object one attribute enum'
2102+
type: 'array'
2103+
uniqueItems: true
2104+
items:
2105+
type: 'string'
2106+
enum: [
2107+
'value_one',
2108+
'value_two'
2109+
]
2110+
ObjectWithDuplicateInlineEnum:
2111+
type: object
2112+
properties:
2113+
attribute:
2114+
description: 'Object two attribute enum'
2115+
type: 'array'
2116+
uniqueItems: true
2117+
items:
2118+
type: 'string'
2119+
enum: [
2120+
'value_one',
2121+
'value_two'
2122+
]
2123+
ObjectThatReferencesObjectsWithDuplicateInlineEnums:
2124+
type: object
2125+
properties:
2126+
object_one:
2127+
$ref: '#/components/schemas/ObjectWithInlineEnum'
2128+
object_two:
2129+
$ref: '#/components/schemas/ObjectWithDuplicateInlineEnum'

samples/client/echo_api/typescript/build/package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/others/typescript/encode-decode/build/package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ doc/ModelReturn.md
4040
doc/Name.md
4141
doc/NullableClass.md
4242
doc/NumberOnly.md
43+
doc/ObjectThatReferencesObjectsWithDuplicateInlineEnums.md
4344
doc/ObjectWithDeprecatedFields.md
45+
doc/ObjectWithDuplicateInlineEnum.md
46+
doc/ObjectWithInlineEnum.md
4447
doc/Order.md
4548
doc/OuterComposite.md
4649
doc/OuterEnum.md
@@ -110,7 +113,10 @@ lib/src/model/model_return.dart
110113
lib/src/model/name.dart
111114
lib/src/model/nullable_class.dart
112115
lib/src/model/number_only.dart
116+
lib/src/model/object_that_references_objects_with_duplicate_inline_enums.dart
113117
lib/src/model/object_with_deprecated_fields.dart
118+
lib/src/model/object_with_duplicate_inline_enum.dart
119+
lib/src/model/object_with_inline_enum.dart
114120
lib/src/model/order.dart
115121
lib/src/model/outer_composite.dart
116122
lib/src/model/outer_enum.dart

samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Class | Method | HTTP request | Description
6969
[*AnotherFakeApi*](doc/AnotherFakeApi.md) | [**call123testSpecialTags**](doc/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
7070
[*DefaultApi*](doc/DefaultApi.md) | [**fooGet**](doc/DefaultApi.md#fooget) | **GET** /foo |
7171
[*FakeApi*](doc/FakeApi.md) | [**fakeBigDecimalMap**](doc/FakeApi.md#fakebigdecimalmap) | **GET** /fake/BigDecimalMap |
72+
[*FakeApi*](doc/FakeApi.md) | [**fakeDuplicateInlineEnum**](doc/FakeApi.md#fakeduplicateinlineenum) | **GET** /fake/duplicate-inline-enums | test objects with duplicate inline enums see issue# 21582
7273
[*FakeApi*](doc/FakeApi.md) | [**fakeHealthGet**](doc/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
7374
[*FakeApi*](doc/FakeApi.md) | [**fakeHttpSignatureTest**](doc/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication
7475
[*FakeApi*](doc/FakeApi.md) | [**fakeOuterBooleanSerialize**](doc/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
@@ -150,7 +151,10 @@ Class | Method | HTTP request | Description
150151
- [Name](doc/Name.md)
151152
- [NullableClass](doc/NullableClass.md)
152153
- [NumberOnly](doc/NumberOnly.md)
154+
- [ObjectThatReferencesObjectsWithDuplicateInlineEnums](doc/ObjectThatReferencesObjectsWithDuplicateInlineEnums.md)
153155
- [ObjectWithDeprecatedFields](doc/ObjectWithDeprecatedFields.md)
156+
- [ObjectWithDuplicateInlineEnum](doc/ObjectWithDuplicateInlineEnum.md)
157+
- [ObjectWithInlineEnum](doc/ObjectWithInlineEnum.md)
154158
- [Order](doc/Order.md)
155159
- [OuterComposite](doc/OuterComposite.md)
156160
- [OuterEnum](doc/OuterEnum.md)

samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
1010
Method | HTTP request | Description
1111
------------- | ------------- | -------------
1212
[**fakeBigDecimalMap**](FakeApi.md#fakebigdecimalmap) | **GET** /fake/BigDecimalMap |
13+
[**fakeDuplicateInlineEnum**](FakeApi.md#fakeduplicateinlineenum) | **GET** /fake/duplicate-inline-enums | test objects with duplicate inline enums see issue# 21582
1314
[**fakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
1415
[**fakeHttpSignatureTest**](FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication
1516
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
@@ -72,6 +73,43 @@ No authorization required
7273

7374
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
7475

76+
# **fakeDuplicateInlineEnum**
77+
> ObjectThatReferencesObjectsWithDuplicateInlineEnums fakeDuplicateInlineEnum()
78+
79+
test objects with duplicate inline enums see issue# 21582
80+
81+
### Example
82+
```dart
83+
import 'package:openapi/api.dart';
84+
85+
final api = Openapi().getFakeApi();
86+
87+
try {
88+
final response = api.fakeDuplicateInlineEnum();
89+
print(response);
90+
} catch on DioException (e) {
91+
print('Exception when calling FakeApi->fakeDuplicateInlineEnum: $e\n');
92+
}
93+
```
94+
95+
### Parameters
96+
This endpoint does not need any parameter.
97+
98+
### Return type
99+
100+
[**ObjectThatReferencesObjectsWithDuplicateInlineEnums**](ObjectThatReferencesObjectsWithDuplicateInlineEnums.md)
101+
102+
### Authorization
103+
104+
No authorization required
105+
106+
### HTTP request headers
107+
108+
- **Content-Type**: Not defined
109+
- **Accept**: application/json
110+
111+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
112+
75113
# **fakeHealthGet**
76114
> HealthCheckResult fakeHealthGet()
77115
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# openapi.model.ObjectThatReferencesObjectsWithDuplicateInlineEnums
2+
3+
## Load the model package
4+
```dart
5+
import 'package:openapi/api.dart';
6+
```
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**objectOne** | [**ObjectWithInlineEnum**](ObjectWithInlineEnum.md) | | [optional]
12+
**objectTwo** | [**ObjectWithDuplicateInlineEnum**](ObjectWithDuplicateInlineEnum.md) | | [optional]
13+
14+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15+
16+

0 commit comments

Comments
 (0)