Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/samples-dart-build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
- samples/openapi3/client/petstore/dart-dio/oneof/**
- samples/openapi3/client/petstore/dart-dio/anyof/**
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/**
- samples/openapi3/client/petstore/dart-dio/binary_response/**
- samples/openapi3/client/petstore/dart-dio/petstore-timemachine/**
Expand All @@ -19,6 +20,7 @@ on:
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
- samples/openapi3/client/petstore/dart-dio/oneof/**
- samples/openapi3/client/petstore/dart-dio/anyof/**
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/**
- samples/openapi3/client/petstore/dart-dio/binary_response/**
- samples/openapi3/client/petstore/dart-dio/petstore-timemachine/**
Expand All @@ -36,6 +38,7 @@ jobs:
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/
- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/
- samples/openapi3/client/petstore/dart-dio/oneof/
- samples/openapi3/client/petstore/dart-dio/anyof/
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/
- samples/openapi3/client/petstore/dart-dio/binary_response/
- samples/openapi3/client/petstore/dart-dio/petstore-timemachine/
Expand Down
11 changes: 11 additions & 0 deletions bin/configs/dart-dio-anyof.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
generatorName: dart-dio
outputDir: samples/openapi3/client/petstore/dart-dio/anyof
inputSpec: modules/openapi-generator/src/test/resources/3_0/dart-dio/built_value_anyof_primitive.yaml
templateDir: modules/openapi-generator/src/main/resources/dart/libraries/dio
typeMappings:
Client: "ModelClient"
File: "ModelFile"
EnumClass: "ModelEnumClass"
additionalProperties:
hideGenerationTimestamp: "true"
enumUnknownDefaultCase: "true"
41 changes: 41 additions & 0 deletions samples/openapi3/client/petstore/dart-dio/anyof/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://dart.dev/guides/libraries/private-files

# Files and directories created by pub
.dart_tool/
.buildlog
.packages
.project
.pub/
build/
**/packages/

# Files created by dart2js
# (Most Dart developers will use pub build to compile Dart, use/modify these
# rules if you intend to use dart2js directly
# Convention is to use extension '.dart.js' for Dart compiled to Javascript to
# differentiate from explicit Javascript files)
*.dart.js
*.part.js
*.js.deps
*.js.map
*.info.json

# Directory created by dartdoc
doc/api/

# Don't commit pubspec lock file
# (Library packages only! Remove pattern if developing an application package)
pubspec.lock

# Don’t commit files and directories created by other development environments.
# For example, if your development environment creates any of the following files,
# consider putting them in a global ignore file:

# IntelliJ
*.iml
*.ipr
*.iws
.idea/

# Mac
.DS_Store
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.gitignore
README.md
analysis_options.yaml
doc/DefaultApi.md
doc/FieldValue.md
lib/openapi.dart
lib/src/api.dart
lib/src/api/default_api.dart
lib/src/api_util.dart
lib/src/auth/api_key_auth.dart
lib/src/auth/auth.dart
lib/src/auth/basic_auth.dart
lib/src/auth/bearer_auth.dart
lib/src/auth/oauth.dart
lib/src/date_serializer.dart
lib/src/model/date.dart
lib/src/model/field_value.dart
lib/src/serializers.dart
pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.25.0-SNAPSHOT
83 changes: 83 additions & 0 deletions samples/openapi3/client/petstore/dart-dio/anyof/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# openapi (EXPERIMENTAL)
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.0
- Generator version: 7.25.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen

## Requirements

* Dart 2.15.0+ or Flutter 2.8.0+
* Dio 5.0.0+ (https://pub.dev/packages/dio)

## Installation & Usage

### pub.dev
To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml
```yaml
dependencies:
openapi: 1.0.0
```

### Github
If this Dart package is published to Github, please include the following in pubspec.yaml
```yaml
dependencies:
openapi:
git:
url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
#ref: main
```

### Local development
To use the package from your local drive, please include the following in pubspec.yaml
```yaml
dependencies:
openapi:
path: /path/to/openapi
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```dart
import 'package:openapi/openapi.dart';


final api = Openapi().getDefaultApi();

try {
final response = await api.getFieldValue();
print(response);
} on DioException catch (e) {
print("Exception when calling DefaultApi->getFieldValue: $e\n");
}

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
[*DefaultApi*](doc/DefaultApi.md) | [**getFieldValue**](doc/DefaultApi.md#getfieldvalue) | **GET** /field-value |


## Documentation For Models

- [FieldValue](doc/FieldValue.md)


## Documentation For Authorization

Endpoints do not require authorization.


## Author



Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
analyzer:
language:
strict-inference: true
strict-raw-types: true
strict-casts: false
exclude:
- test/*.dart
errors:
deprecated_member_use_from_same_package: ignore
51 changes: 51 additions & 0 deletions samples/openapi3/client/petstore/dart-dio/anyof/doc/DefaultApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# openapi.api.DefaultApi

## Load the API package
```dart
import 'package:openapi/api.dart';
```

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getFieldValue**](DefaultApi.md#getfieldvalue) | **GET** /field-value |


# **getFieldValue**
> FieldValue getFieldValue()



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getDefaultApi();

try {
final response = api.getFieldValue();
print(response);
} on DioException catch (e) {
print('Exception when calling DefaultApi->getFieldValue: $e\n');
}
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**FieldValue**](FieldValue.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[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)

14 changes: 14 additions & 0 deletions samples/openapi3/client/petstore/dart-dio/anyof/doc/FieldValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# openapi.model.FieldValue

## Load the model package
```dart
import 'package:openapi/api.dart';
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

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


16 changes: 16 additions & 0 deletions samples/openapi3/client/petstore/dart-dio/anyof/lib/openapi.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//

export 'package:openapi/src/api.dart';
export 'package:openapi/src/auth/api_key_auth.dart';
export 'package:openapi/src/auth/basic_auth.dart';
export 'package:openapi/src/auth/bearer_auth.dart';
export 'package:openapi/src/auth/oauth.dart';
export 'package:openapi/src/serializers.dart';
export 'package:openapi/src/model/date.dart';

export 'package:openapi/src/api/default_api.dart';

export 'package:openapi/src/model/field_value.dart';

Loading
Loading