fix import in sample code (dart) (#4292)

This commit is contained in:
wing328 2016-11-30 18:30:30 +08:00 committed by GitHub
parent 1658111345
commit c6aea46fa0
5 changed files with 22 additions and 43 deletions

View File

@ -24,8 +24,7 @@ Method | HTTP request | Description
### Example ### Example
```dart ```dart
import '{{pubName}}.api'; import 'package:{{pubName}}/api.dart';
import '{{pubName}}.model';
{{#hasAuthMethods}} {{#hasAuthMethods}}
{{#authMethods}} {{#authMethods}}
{{#isBasic}} {{#isBasic}}

View File

@ -4,7 +4,7 @@ This is a sample server Petstore server. You can find out more about Swagger at
This Dart package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: This Dart package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0 - API version: 1.0.0
- Build date: 2016-11-30T17:17:22.024+08:00 - Build date: 2016-11-30T18:12:21.701+08:00
- Build package: class io.swagger.codegen.languages.DartClientCodegen - Build package: class io.swagger.codegen.languages.DartClientCodegen
## Requirements ## Requirements

View File

@ -28,8 +28,7 @@ Add a new pet to the store
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
// TODO Configure OAuth2 access token for authorization: petstore_auth // TODO Configure OAuth2 access token for authorization: petstore_auth
//swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; //swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
@ -73,8 +72,7 @@ Deletes a pet
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
// TODO Configure OAuth2 access token for authorization: petstore_auth // TODO Configure OAuth2 access token for authorization: petstore_auth
//swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; //swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
@ -120,8 +118,7 @@ Multiple status values can be provided with comma separated strings
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
// TODO Configure OAuth2 access token for authorization: petstore_auth // TODO Configure OAuth2 access token for authorization: petstore_auth
//swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; //swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
@ -166,8 +163,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
// TODO Configure OAuth2 access token for authorization: petstore_auth // TODO Configure OAuth2 access token for authorization: petstore_auth
//swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; //swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
@ -212,8 +208,7 @@ Returns a single pet
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
// TODO Configure API key authorization: api_key // TODO Configure API key authorization: api_key
//swagger.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; //swagger.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed // uncomment below to setup prefix (e.g. Bearer) for API key, if needed
@ -260,8 +255,7 @@ Update an existing pet
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
// TODO Configure OAuth2 access token for authorization: petstore_auth // TODO Configure OAuth2 access token for authorization: petstore_auth
//swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; //swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
@ -305,8 +299,7 @@ Updates a pet in the store with form data
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
// TODO Configure OAuth2 access token for authorization: petstore_auth // TODO Configure OAuth2 access token for authorization: petstore_auth
//swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; //swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
@ -354,8 +347,7 @@ uploads an image
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
// TODO Configure OAuth2 access token for authorization: petstore_auth // TODO Configure OAuth2 access token for authorization: petstore_auth
//swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; //swagger.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';

View File

@ -24,8 +24,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
var api_instance = new StoreApi(); var api_instance = new StoreApi();
var orderId = orderId_example; // String | ID of the order that needs to be deleted var orderId = orderId_example; // String | ID of the order that needs to be deleted
@ -67,8 +66,7 @@ Returns a map of status codes to quantities
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
// TODO Configure API key authorization: api_key // TODO Configure API key authorization: api_key
//swagger.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; //swagger.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed // uncomment below to setup prefix (e.g. Bearer) for API key, if needed
@ -111,8 +109,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
var api_instance = new StoreApi(); var api_instance = new StoreApi();
var orderId = 789; // int | ID of pet that needs to be fetched var orderId = 789; // int | ID of pet that needs to be fetched
@ -155,8 +152,7 @@ Place an order for a pet
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
var api_instance = new StoreApi(); var api_instance = new StoreApi();
var body = new Order(); // Order | order placed for purchasing the pet var body = new Order(); // Order | order placed for purchasing the pet

View File

@ -28,8 +28,7 @@ This can only be done by the logged in user.
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
var api_instance = new UserApi(); var api_instance = new UserApi();
var body = new User(); // User | Created user object var body = new User(); // User | Created user object
@ -71,8 +70,7 @@ Creates list of users with given input array
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
var api_instance = new UserApi(); var api_instance = new UserApi();
var body = [new List&lt;User&gt;()]; // List<User> | List of user object var body = [new List&lt;User&gt;()]; // List<User> | List of user object
@ -114,8 +112,7 @@ Creates list of users with given input array
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
var api_instance = new UserApi(); var api_instance = new UserApi();
var body = [new List&lt;User&gt;()]; // List<User> | List of user object var body = [new List&lt;User&gt;()]; // List<User> | List of user object
@ -157,8 +154,7 @@ This can only be done by the logged in user.
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
var api_instance = new UserApi(); var api_instance = new UserApi();
var username = username_example; // String | The name that needs to be deleted var username = username_example; // String | The name that needs to be deleted
@ -200,8 +196,7 @@ Get user by user name
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
var api_instance = new UserApi(); var api_instance = new UserApi();
var username = username_example; // String | The name that needs to be fetched. Use user1 for testing. var username = username_example; // String | The name that needs to be fetched. Use user1 for testing.
@ -244,8 +239,7 @@ Logs user into the system
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
var api_instance = new UserApi(); var api_instance = new UserApi();
var username = username_example; // String | The user name for login var username = username_example; // String | The user name for login
@ -290,8 +284,7 @@ Logs out current logged in user session
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
var api_instance = new UserApi(); var api_instance = new UserApi();
@ -329,8 +322,7 @@ This can only be done by the logged in user.
### Example ### Example
```dart ```dart
import 'swagger.api'; import 'package:swagger/api.dart';
import 'swagger.model';
var api_instance = new UserApi(); var api_instance = new UserApi();
var username = username_example; // String | name that need to be deleted var username = username_example; // String | name that need to be deleted