Skip to content

Commit bad8a46

Browse files
committed
#21582 [BUG][dart-dio] Bug generating inline enums with common names added generated samples to commit.
1 parent bf9affc commit bad8a46

49 files changed

Lines changed: 2362 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://dart.dev/guides/libraries/private-files
2+
3+
# Files and directories created by pub
4+
.dart_tool/
5+
.buildlog
6+
.packages
7+
.project
8+
.pub/
9+
build/
10+
**/packages/
11+
12+
# Files created by dart2js
13+
# (Most Dart developers will use pub build to compile Dart, use/modify these
14+
# rules if you intend to use dart2js directly
15+
# Convention is to use extension '.dart.js' for Dart compiled to Javascript to
16+
# differentiate from explicit Javascript files)
17+
*.dart.js
18+
*.part.js
19+
*.js.deps
20+
*.js.map
21+
*.info.json
22+
23+
# Directory created by dartdoc
24+
doc/api/
25+
26+
# Don't commit pubspec lock file
27+
# (Library packages only! Remove pattern if developing an application package)
28+
pubspec.lock
29+
30+
# Don’t commit files and directories created by other development environments.
31+
# For example, if your development environment creates any of the following files,
32+
# consider putting them in a global ignore file:
33+
34+
# IntelliJ
35+
*.iml
36+
*.ipr
37+
*.iws
38+
.idea/
39+
40+
# Mac
41+
.DS_Store
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.gitignore
2+
README.md
3+
analysis_options.yaml
4+
doc/DefaultApi.md
5+
doc/ObjectOne.md
6+
doc/ObjectThree.md
7+
doc/ObjectTwo.md
8+
lib/openapi.dart
9+
lib/src/api.dart
10+
lib/src/api/default_api.dart
11+
lib/src/api_util.dart
12+
lib/src/auth/api_key_auth.dart
13+
lib/src/auth/auth.dart
14+
lib/src/auth/basic_auth.dart
15+
lib/src/auth/bearer_auth.dart
16+
lib/src/auth/oauth.dart
17+
lib/src/date_serializer.dart
18+
lib/src/model/date.dart
19+
lib/src/model/object_one.dart
20+
lib/src/model/object_three.dart
21+
lib/src/model/object_two.dart
22+
lib/src/serializers.dart
23+
pubspec.yaml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
unset
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# openapi (EXPERIMENTAL)
2+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3+
4+
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
5+
6+
- API version: 1.0.0
7+
- Generator version: unset
8+
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen
9+
10+
## Requirements
11+
12+
* Dart 2.15.0+ or Flutter 2.8.0+
13+
* Dio 5.0.0+ (https://pub.dev/packages/dio)
14+
15+
## Installation & Usage
16+
17+
### pub.dev
18+
To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml
19+
```yaml
20+
dependencies:
21+
openapi: 1.0.0
22+
```
23+
24+
### Github
25+
If this Dart package is published to Github, please include the following in pubspec.yaml
26+
```yaml
27+
dependencies:
28+
openapi:
29+
git:
30+
url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
31+
#ref: main
32+
```
33+
34+
### Local development
35+
To use the package from your local drive, please include the following in pubspec.yaml
36+
```yaml
37+
dependencies:
38+
openapi:
39+
path: /path/to/openapi
40+
```
41+
42+
## Getting Started
43+
44+
Please follow the [installation procedure](#installation--usage) and then run the following:
45+
46+
```dart
47+
import 'package:openapi/openapi.dart';
48+
49+
50+
final api = Openapi().getDefaultApi();
51+
52+
try {
53+
final response = await api.test();
54+
print(response);
55+
} catch on DioException (e) {
56+
print("Exception when calling DefaultApi->test: $e\n");
57+
}
58+
59+
```
60+
61+
## Documentation for API Endpoints
62+
63+
All URIs are relative to *http://localhost*
64+
65+
Class | Method | HTTP request | Description
66+
------------ | ------------- | ------------- | -------------
67+
[*DefaultApi*](doc/DefaultApi.md) | [**test**](doc/DefaultApi.md#test) | **GET** /test | test
68+
69+
70+
## Documentation For Models
71+
72+
- [ObjectOne](doc/ObjectOne.md)
73+
- [ObjectThree](doc/ObjectThree.md)
74+
- [ObjectTwo](doc/ObjectTwo.md)
75+
76+
77+
## Documentation For Authorization
78+
79+
Endpoints do not require authorization.
80+
81+
82+
## Author
83+
84+
85+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
analyzer:
2+
language:
3+
strict-inference: true
4+
strict-raw-types: true
5+
strict-casts: false
6+
exclude:
7+
- test/*.dart
8+
errors:
9+
deprecated_member_use_from_same_package: ignore
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# openapi.api.DefaultApi
2+
3+
## Load the API package
4+
```dart
5+
import 'package:openapi/api.dart';
6+
```
7+
8+
All URIs are relative to *http://localhost*
9+
10+
Method | HTTP request | Description
11+
------------- | ------------- | -------------
12+
[**test**](DefaultApi.md#test) | **GET** /test | test
13+
14+
15+
# **test**
16+
> ObjectThree test()
17+
18+
test
19+
20+
### Example
21+
```dart
22+
import 'package:openapi/api.dart';
23+
24+
final api = Openapi().getDefaultApi();
25+
26+
try {
27+
final response = api.test();
28+
print(response);
29+
} catch on DioException (e) {
30+
print('Exception when calling DefaultApi->test: $e\n');
31+
}
32+
```
33+
34+
### Parameters
35+
This endpoint does not need any parameter.
36+
37+
### Return type
38+
39+
[**ObjectThree**](ObjectThree.md)
40+
41+
### Authorization
42+
43+
No authorization required
44+
45+
### HTTP request headers
46+
47+
- **Content-Type**: Not defined
48+
- **Accept**: application/json
49+
50+
[[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)
51+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# openapi.model.ObjectOne
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+
**attribute** | **BuiltSet<String>** | Object one attribute enum | [optional]
12+
13+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14+
15+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# openapi.model.ObjectThree
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** | [**ObjectOne**](ObjectOne.md) | | [optional]
12+
**objecttwo** | [**ObjectTwo**](ObjectTwo.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+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# openapi.model.ObjectTwo
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+
**attribute** | **BuiltSet<String>** | Object two attribute enum | [optional]
12+
13+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14+
15+

0 commit comments

Comments
 (0)