forked from loafle/openapi-generator-original
Add multiple servers support to JS API client (#1974)
* add multiple servers support to JS ES6 * multiple server support in js es5 * using exports in es5 * fix index check * add oas v3 js es6 client to travis
This commit is contained in:
3
samples/openapi3/client/petstore/javascript-es6/.babelrc
Normal file
3
samples/openapi3/client/petstore/javascript-es6/.babelrc
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"presets": ["env", "stage-0"]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# Swagger Codegen Ignore
|
||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
||||
|
||||
# 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 Swagger Codgen 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
|
||||
@@ -0,0 +1 @@
|
||||
4.0.0-SNAPSHOT
|
||||
@@ -0,0 +1,7 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "6"
|
||||
- "6.1"
|
||||
- "5"
|
||||
- "5.11"
|
||||
|
||||
204
samples/openapi3/client/petstore/javascript-es6/README.md
Normal file
204
samples/openapi3/client/petstore/javascript-es6/README.md
Normal file
@@ -0,0 +1,204 @@
|
||||
# open_api_petstore
|
||||
|
||||
OpenApiPetstore - JavaScript client for open_api_petstore
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
|
||||
|
||||
## Installation
|
||||
|
||||
### For [Node.js](https://nodejs.org/)
|
||||
|
||||
#### npm
|
||||
|
||||
To publish the library as a [npm](https://www.npmjs.com/),
|
||||
please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
|
||||
|
||||
Then install it via:
|
||||
|
||||
```shell
|
||||
npm install open_api_petstore --save
|
||||
```
|
||||
|
||||
#### git
|
||||
#
|
||||
If the library is hosted at a git repository, e.g.
|
||||
https://github.com/GIT_USER_ID/GIT_REPO_ID
|
||||
then install it via:
|
||||
|
||||
```shell
|
||||
npm install GIT_USER_ID/GIT_REPO_ID --save
|
||||
```
|
||||
|
||||
### For browser
|
||||
|
||||
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
|
||||
the above steps with Node.js and installing browserify with `npm install -g browserify`,
|
||||
perform the following (assuming *main.js* is your entry file):
|
||||
|
||||
```shell
|
||||
browserify main.js > bundle.js
|
||||
```
|
||||
|
||||
Then include *bundle.js* in the HTML pages.
|
||||
|
||||
### Webpack Configuration
|
||||
|
||||
Using Webpack you may encounter the following error: "Module not found: Error:
|
||||
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
|
||||
the following section to your webpack config:
|
||||
|
||||
```javascript
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
parser: {
|
||||
amd: false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please follow the [installation](#installation) instruction and execute the following JS code:
|
||||
|
||||
```javascript
|
||||
var OpenApiPetstore = require('open_api_petstore');
|
||||
|
||||
|
||||
var api = new OpenApiPetstore.AnotherFakeApi()
|
||||
var client = new OpenApiPetstore.Client(); // {Client} client model
|
||||
var callback = function(error, data, response) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
};
|
||||
api.call123testSpecialTags(client, callback);
|
||||
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*OpenApiPetstore.DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
*OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*OpenApiPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
*OpenApiPetstore.FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*OpenApiPetstore.FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*OpenApiPetstore.FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*OpenApiPetstore.FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*OpenApiPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
*OpenApiPetstore.PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*OpenApiPetstore.PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*OpenApiPetstore.PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*OpenApiPetstore.PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
*OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
*OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
*OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
*OpenApiPetstore.StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
*OpenApiPetstore.UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
|
||||
*OpenApiPetstore.UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*OpenApiPetstore.UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*OpenApiPetstore.UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
*OpenApiPetstore.UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
*OpenApiPetstore.UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
*OpenApiPetstore.UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
*OpenApiPetstore.UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [OpenApiPetstore.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||
- [OpenApiPetstore.Animal](docs/Animal.md)
|
||||
- [OpenApiPetstore.ApiResponse](docs/ApiResponse.md)
|
||||
- [OpenApiPetstore.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [OpenApiPetstore.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [OpenApiPetstore.ArrayTest](docs/ArrayTest.md)
|
||||
- [OpenApiPetstore.Capitalization](docs/Capitalization.md)
|
||||
- [OpenApiPetstore.Cat](docs/Cat.md)
|
||||
- [OpenApiPetstore.Category](docs/Category.md)
|
||||
- [OpenApiPetstore.ClassModel](docs/ClassModel.md)
|
||||
- [OpenApiPetstore.Client](docs/Client.md)
|
||||
- [OpenApiPetstore.Dog](docs/Dog.md)
|
||||
- [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
|
||||
- [OpenApiPetstore.EnumClass](docs/EnumClass.md)
|
||||
- [OpenApiPetstore.EnumTest](docs/EnumTest.md)
|
||||
- [OpenApiPetstore.File](docs/File.md)
|
||||
- [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [OpenApiPetstore.Foo](docs/Foo.md)
|
||||
- [OpenApiPetstore.FormatTest](docs/FormatTest.md)
|
||||
- [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [OpenApiPetstore.InlineObject](docs/InlineObject.md)
|
||||
- [OpenApiPetstore.InlineObject1](docs/InlineObject1.md)
|
||||
- [OpenApiPetstore.InlineObject2](docs/InlineObject2.md)
|
||||
- [OpenApiPetstore.InlineObject3](docs/InlineObject3.md)
|
||||
- [OpenApiPetstore.InlineObject4](docs/InlineObject4.md)
|
||||
- [OpenApiPetstore.InlineObject5](docs/InlineObject5.md)
|
||||
- [OpenApiPetstore.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [OpenApiPetstore.List](docs/List.md)
|
||||
- [OpenApiPetstore.MapTest](docs/MapTest.md)
|
||||
- [OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
- [OpenApiPetstore.Model200Response](docs/Model200Response.md)
|
||||
- [OpenApiPetstore.ModelReturn](docs/ModelReturn.md)
|
||||
- [OpenApiPetstore.Name](docs/Name.md)
|
||||
- [OpenApiPetstore.NumberOnly](docs/NumberOnly.md)
|
||||
- [OpenApiPetstore.Order](docs/Order.md)
|
||||
- [OpenApiPetstore.OuterComposite](docs/OuterComposite.md)
|
||||
- [OpenApiPetstore.OuterEnum](docs/OuterEnum.md)
|
||||
- [OpenApiPetstore.Pet](docs/Pet.md)
|
||||
- [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [OpenApiPetstore.Tag](docs/Tag.md)
|
||||
- [OpenApiPetstore.User](docs/User.md)
|
||||
|
||||
|
||||
## Documentation for Authorization
|
||||
|
||||
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
### api_key_query
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key_query
|
||||
- **Location**: URL query string
|
||||
|
||||
### http_basic_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
### petstore_auth
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.AdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapProperty** | **{String: String}** | | [optional]
|
||||
**mapOfMapProperty** | **{String: {String: String}}** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.Animal
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional] [default to 'red']
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# OpenApiPetstore.AnimalFarm
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
# OpenApiPetstore.AnotherFakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
|
||||
|
||||
<a name="call123testSpecialTags"></a>
|
||||
# **call123testSpecialTags**
|
||||
> Client call123testSpecialTags(client)
|
||||
|
||||
To test special tags
|
||||
|
||||
To test special tags and operation ID starting with number
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.AnotherFakeApi();
|
||||
let client = new OpenApiPetstore.Client(); // Client | client model
|
||||
apiInstance.call123testSpecialTags(client, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OpenApiPetstore.ApiResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **Number** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**message** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.ArrayOfArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayArrayNumber** | **[[Number]]** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.ArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayNumber** | **[Number]** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OpenApiPetstore.ArrayTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayOfString** | **[String]** | | [optional]
|
||||
**arrayArrayOfInteger** | **[[Number]]** | | [optional]
|
||||
**arrayArrayOfModel** | **[[ReadOnlyFirst]]** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# OpenApiPetstore.Capitalization
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**smallCamel** | **String** | | [optional]
|
||||
**capitalCamel** | **String** | | [optional]
|
||||
**smallSnake** | **String** | | [optional]
|
||||
**capitalSnake** | **String** | | [optional]
|
||||
**sCAETHFlowPoints** | **String** | | [optional]
|
||||
**ATT_NAME** | **String** | Name of the pet | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.Cat
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.Category
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Number** | | [optional]
|
||||
**name** | **String** | | [default to 'default-name']
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.ClassModel
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_class** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.Client
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**client** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# OpenApiPetstore.DefaultApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo |
|
||||
|
||||
|
||||
<a name="fooGet"></a>
|
||||
# **fooGet**
|
||||
> InlineResponseDefault fooGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.DefaultApi();
|
||||
apiInstance.fooGet((error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.Dog
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# OpenApiPetstore.EnumArrays
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**justSymbol** | **String** | | [optional]
|
||||
**arrayEnum** | **[String]** | | [optional]
|
||||
|
||||
|
||||
<a name="JustSymbolEnum"></a>
|
||||
## Enum: JustSymbolEnum
|
||||
|
||||
|
||||
* `GREATER_THAN_OR_EQUAL_TO` (value: `">="`)
|
||||
|
||||
* `DOLLAR` (value: `"$"`)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="[ArrayEnumEnum]"></a>
|
||||
## Enum: [ArrayEnumEnum]
|
||||
|
||||
|
||||
* `fish` (value: `"fish"`)
|
||||
|
||||
* `crab` (value: `"crab"`)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# OpenApiPetstore.EnumClass
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `_abc` (value: `"_abc"`)
|
||||
|
||||
* `-efg` (value: `"-efg"`)
|
||||
|
||||
* `(xyz)` (value: `"(xyz)"`)
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# OpenApiPetstore.EnumTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enumString** | **String** | | [optional]
|
||||
**enumStringRequired** | **String** | |
|
||||
**enumInteger** | **Number** | | [optional]
|
||||
**enumNumber** | **Number** | | [optional]
|
||||
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
|
||||
|
||||
|
||||
<a name="EnumStringEnum"></a>
|
||||
## Enum: EnumStringEnum
|
||||
|
||||
|
||||
* `UPPER` (value: `"UPPER"`)
|
||||
|
||||
* `lower` (value: `"lower"`)
|
||||
|
||||
* `empty` (value: `""`)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="EnumStringRequiredEnum"></a>
|
||||
## Enum: EnumStringRequiredEnum
|
||||
|
||||
|
||||
* `UPPER` (value: `"UPPER"`)
|
||||
|
||||
* `lower` (value: `"lower"`)
|
||||
|
||||
* `empty` (value: `""`)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="EnumIntegerEnum"></a>
|
||||
## Enum: EnumIntegerEnum
|
||||
|
||||
|
||||
* `1` (value: `1`)
|
||||
|
||||
* `-1` (value: `-1`)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="EnumNumberEnum"></a>
|
||||
## Enum: EnumNumberEnum
|
||||
|
||||
|
||||
* `1.1` (value: `1.1`)
|
||||
|
||||
* `-1.2` (value: `-1.2`)
|
||||
|
||||
|
||||
|
||||
|
||||
592
samples/openapi3/client/petstore/javascript-es6/docs/FakeApi.md
Normal file
592
samples/openapi3/client/petstore/javascript-es6/docs/FakeApi.md
Normal file
@@ -0,0 +1,592 @@
|
||||
# OpenApiPetstore.FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
<a name="fakeOuterBooleanSerialize"></a>
|
||||
# **fakeOuterBooleanSerialize**
|
||||
> Boolean fakeOuterBooleanSerialize(opts)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer boolean types
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let opts = {
|
||||
'body': true // Boolean | Input boolean as post body
|
||||
};
|
||||
apiInstance.fakeOuterBooleanSerialize(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **Boolean**| Input boolean as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**Boolean**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="fakeOuterCompositeSerialize"></a>
|
||||
# **fakeOuterCompositeSerialize**
|
||||
> OuterComposite fakeOuterCompositeSerialize(opts)
|
||||
|
||||
|
||||
|
||||
Test serialization of object with outer number type
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let opts = {
|
||||
'outerComposite': new OpenApiPetstore.OuterComposite() // OuterComposite | Input composite as post body
|
||||
};
|
||||
apiInstance.fakeOuterCompositeSerialize(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**OuterComposite**](OuterComposite.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="fakeOuterNumberSerialize"></a>
|
||||
# **fakeOuterNumberSerialize**
|
||||
> Number fakeOuterNumberSerialize(opts)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer number types
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let opts = {
|
||||
'body': 3.4 // Number | Input number as post body
|
||||
};
|
||||
apiInstance.fakeOuterNumberSerialize(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **Number**| Input number as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**Number**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="fakeOuterStringSerialize"></a>
|
||||
# **fakeOuterStringSerialize**
|
||||
> String fakeOuterStringSerialize(opts)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer string types
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let opts = {
|
||||
'body': "body_example" // String | Input string as post body
|
||||
};
|
||||
apiInstance.fakeOuterStringSerialize(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **String**| Input string as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testBodyWithFileSchema"></a>
|
||||
# **testBodyWithFileSchema**
|
||||
> testBodyWithFileSchema(fileSchemaTestClass)
|
||||
|
||||
|
||||
|
||||
For this test, the body for this request much reference a schema named `File`.
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
|
||||
apiInstance.testBodyWithFileSchema(fileSchemaTestClass, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testBodyWithQueryParams"></a>
|
||||
# **testBodyWithQueryParams**
|
||||
> testBodyWithQueryParams(query, user)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let query = "query_example"; // String |
|
||||
let user = new OpenApiPetstore.User(); // User |
|
||||
apiInstance.testBodyWithQueryParams(query, user, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**query** | **String**| |
|
||||
**user** | [**User**](User.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testClientModel"></a>
|
||||
# **testClientModel**
|
||||
> Client testClientModel(client)
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let client = new OpenApiPetstore.Client(); // Client | client model
|
||||
apiInstance.testClientModel(client, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="testEndpointParameters"></a>
|
||||
# **testEndpointParameters**
|
||||
> testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts)
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure HTTP basic authorization: http_basic_test
|
||||
let http_basic_test = defaultClient.authentications['http_basic_test'];
|
||||
http_basic_test.username = 'YOUR USERNAME';
|
||||
http_basic_test.password = 'YOUR PASSWORD';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let _number = 3.4; // Number | None
|
||||
let _double = 3.4; // Number | None
|
||||
let patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
|
||||
let _byte = null; // Blob | None
|
||||
let opts = {
|
||||
'integer': 56, // Number | None
|
||||
'int32': 56, // Number | None
|
||||
'int64': 789, // Number | None
|
||||
'_float': 3.4, // Number | None
|
||||
'_string': "_string_example", // String | None
|
||||
'binary': "/path/to/file", // File | None
|
||||
'_date': new Date("2013-10-20"), // Date | None
|
||||
'dateTime': new Date("2013-10-20T19:20:30+01:00"), // Date | None
|
||||
'password': "password_example", // String | None
|
||||
'callback': "callback_example" // String | None
|
||||
};
|
||||
apiInstance.testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**_number** | **Number**| None |
|
||||
**_double** | **Number**| None |
|
||||
**patternWithoutDelimiter** | **String**| None |
|
||||
**_byte** | **Blob**| None |
|
||||
**integer** | **Number**| None | [optional]
|
||||
**int32** | **Number**| None | [optional]
|
||||
**int64** | **Number**| None | [optional]
|
||||
**_float** | **Number**| None | [optional]
|
||||
**_string** | **String**| None | [optional]
|
||||
**binary** | **File**| None | [optional]
|
||||
**_date** | **Date**| None | [optional]
|
||||
**dateTime** | **Date**| None | [optional]
|
||||
**password** | **String**| None | [optional]
|
||||
**callback** | **String**| None | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[http_basic_test](../README.md#http_basic_test)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testEnumParameters"></a>
|
||||
# **testEnumParameters**
|
||||
> testEnumParameters(opts)
|
||||
|
||||
To test enum parameters
|
||||
|
||||
To test enum parameters
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let opts = {
|
||||
'enumHeaderStringArray': ["'$'"], // [String] | Header parameter enum test (string array)
|
||||
'enumHeaderString': "'-efg'", // String | Header parameter enum test (string)
|
||||
'enumQueryStringArray': ["'$'"], // [String] | Query parameter enum test (string array)
|
||||
'enumQueryString': "'-efg'", // String | Query parameter enum test (string)
|
||||
'enumQueryInteger': 56, // Number | Query parameter enum test (double)
|
||||
'enumQueryDouble': 3.4, // Number | Query parameter enum test (double)
|
||||
'enumFormStringArray': "'$'", // [String] | Form parameter enum test (string array)
|
||||
'enumFormString': "'-efg'" // String | Form parameter enum test (string)
|
||||
};
|
||||
apiInstance.testEnumParameters(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enumHeaderStringArray** | [**[String]**](String.md)| Header parameter enum test (string array) | [optional]
|
||||
**enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to '-efg']
|
||||
**enumQueryStringArray** | [**[String]**](String.md)| Query parameter enum test (string array) | [optional]
|
||||
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg']
|
||||
**enumQueryInteger** | **Number**| Query parameter enum test (double) | [optional]
|
||||
**enumQueryDouble** | **Number**| Query parameter enum test (double) | [optional]
|
||||
**enumFormStringArray** | [**[String]**](String.md)| Form parameter enum test (string array) | [optional] [default to '$']
|
||||
**enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg']
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testGroupParameters"></a>
|
||||
# **testGroupParameters**
|
||||
> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts)
|
||||
|
||||
Fake endpoint to test group parameters (optional)
|
||||
|
||||
Fake endpoint to test group parameters (optional)
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let requiredStringGroup = 56; // Number | Required String in group parameters
|
||||
let requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
|
||||
let requiredInt64Group = 789; // Number | Required Integer in group parameters
|
||||
let opts = {
|
||||
'stringGroup': 56, // Number | String in group parameters
|
||||
'booleanGroup': true, // Boolean | Boolean in group parameters
|
||||
'int64Group': 789 // Number | Integer in group parameters
|
||||
};
|
||||
apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**requiredStringGroup** | **Number**| Required String in group parameters |
|
||||
**requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters |
|
||||
**requiredInt64Group** | **Number**| Required Integer in group parameters |
|
||||
**stringGroup** | **Number**| String in group parameters | [optional]
|
||||
**booleanGroup** | **Boolean**| Boolean in group parameters | [optional]
|
||||
**int64Group** | **Number**| Integer in group parameters | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties(requestBody)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let requestBody = {key: "null"}; // {String: String} | request body
|
||||
apiInstance.testInlineAdditionalProperties(requestBody, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**requestBody** | [**{String: String}**](String.md)| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData(param, param2)
|
||||
|
||||
test json serialization of form data
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let param = "param_example"; // String | field1
|
||||
let param2 = "param2_example"; // String | field2
|
||||
apiInstance.testJsonFormData(param, param2, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **String**| field1 |
|
||||
**param2** | **String**| field2 |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# OpenApiPetstore.FakeClassnameTags123Api
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
|
||||
|
||||
<a name="testClassname"></a>
|
||||
# **testClassname**
|
||||
> Client testClassname(client)
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
let api_key_query = defaultClient.authentications['api_key_query'];
|
||||
api_key_query.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeClassnameTags123Api();
|
||||
let client = new OpenApiPetstore.Client(); // Client | client model
|
||||
apiInstance.testClassname(client, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# SwaggerPetstore.Fake_classname_tags123Api
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**testClassname**](Fake_classname_tags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
|
||||
|
||||
<a name="testClassname"></a>
|
||||
# **testClassname**
|
||||
> Client testClassname(body)
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import SwaggerPetstore from 'swagger_petstore';
|
||||
let defaultClient = SwaggerPetstore.ApiClient.instance;
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
let api_key_query = defaultClient.authentications['api_key_query'];
|
||||
api_key_query.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new SwaggerPetstore.Fake_classname_tags123Api();
|
||||
|
||||
let body = new SwaggerPetstore.Client(); // Client | client model
|
||||
|
||||
|
||||
apiInstance.testClassname(body, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.File
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sourceURI** | **String** | Test capitalization | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.FileSchemaTestClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**file** | **File** | | [optional]
|
||||
**files** | **[File]** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.Foo
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional] [default to 'bar']
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# OpenApiPetstore.FormatTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **Number** | | [optional]
|
||||
**int32** | **Number** | | [optional]
|
||||
**int64** | **Number** | | [optional]
|
||||
**_number** | **Number** | |
|
||||
**_float** | **Number** | | [optional]
|
||||
**_double** | **Number** | | [optional]
|
||||
**_string** | **String** | | [optional]
|
||||
**_byte** | **Blob** | |
|
||||
**binary** | **File** | | [optional]
|
||||
**_date** | **Date** | |
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**uuid** | **String** | | [optional]
|
||||
**password** | **String** | |
|
||||
**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional]
|
||||
**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.HasOnlyReadOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional]
|
||||
**foo** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.InlineObject
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | Updated name of the pet | [optional]
|
||||
**status** | **String** | Updated status of the pet | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.InlineObject1
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **File** | file to upload | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# OpenApiPetstore.InlineObject2
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enumFormStringArray** | **[String]** | Form parameter enum test (string array) | [optional]
|
||||
**enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to '-efg']
|
||||
|
||||
|
||||
<a name="[EnumFormStringArrayEnum]"></a>
|
||||
## Enum: [EnumFormStringArrayEnum]
|
||||
|
||||
|
||||
* `GREATER_THAN` (value: `">"`)
|
||||
|
||||
* `DOLLAR` (value: `"$"`)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="EnumFormStringEnum"></a>
|
||||
## Enum: EnumFormStringEnum
|
||||
|
||||
|
||||
* `_abc` (value: `"_abc"`)
|
||||
|
||||
* `-efg` (value: `"-efg"`)
|
||||
|
||||
* `(xyz)` (value: `"(xyz)"`)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# OpenApiPetstore.InlineObject3
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **Number** | None | [optional]
|
||||
**int32** | **Number** | None | [optional]
|
||||
**int64** | **Number** | None | [optional]
|
||||
**_number** | **Number** | None |
|
||||
**_float** | **Number** | None | [optional]
|
||||
**_double** | **Number** | None |
|
||||
**_string** | **String** | None | [optional]
|
||||
**patternWithoutDelimiter** | **String** | None |
|
||||
**_byte** | **Blob** | None |
|
||||
**binary** | **File** | None | [optional]
|
||||
**_date** | **Date** | None | [optional]
|
||||
**dateTime** | **Date** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
**callback** | **String** | None | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.InlineObject4
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**param** | **String** | field1 |
|
||||
**param2** | **String** | field2 |
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.InlineObject5
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
|
||||
**requiredFile** | **File** | file to upload |
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.InlineResponseDefault
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_string** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.List
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_123list** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# OpenApiPetstore.MapTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapMapOfString** | **{String: {String: String}}** | | [optional]
|
||||
**mapOfEnumString** | **{String: String}** | | [optional]
|
||||
**directMap** | **{String: Boolean}** | | [optional]
|
||||
**indirectMap** | **{String: Boolean}** | | [optional]
|
||||
|
||||
|
||||
<a name="{String: String}"></a>
|
||||
## Enum: {String: String}
|
||||
|
||||
|
||||
* `UPPER` (value: `"UPPER"`)
|
||||
|
||||
* `lower` (value: `"lower"`)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | **String** | | [optional]
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**map** | [**{String: Animal}**](Animal.md) | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.Model200Response
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **Number** | | [optional]
|
||||
**_class** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.ModelReturn
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_return** | **Number** | | [optional]
|
||||
|
||||
|
||||
11
samples/openapi3/client/petstore/javascript-es6/docs/Name.md
Normal file
11
samples/openapi3/client/petstore/javascript-es6/docs/Name.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# OpenApiPetstore.Name
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **Number** | |
|
||||
**snakeCase** | **Number** | | [optional]
|
||||
**property** | **String** | | [optional]
|
||||
**_123number** | **Number** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.NumberOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**justNumber** | **Number** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# OpenApiPetstore.Order
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Number** | | [optional]
|
||||
**petId** | **Number** | | [optional]
|
||||
**quantity** | **Number** | | [optional]
|
||||
**shipDate** | **Date** | | [optional]
|
||||
**status** | **String** | Order Status | [optional]
|
||||
**complete** | **Boolean** | | [optional] [default to false]
|
||||
|
||||
|
||||
<a name="StatusEnum"></a>
|
||||
## Enum: StatusEnum
|
||||
|
||||
|
||||
* `placed` (value: `"placed"`)
|
||||
|
||||
* `approved` (value: `"approved"`)
|
||||
|
||||
* `delivered` (value: `"delivered"`)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# SwaggerPetstore.OuterBoolean
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OpenApiPetstore.OuterComposite
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**myNumber** | **Number** | | [optional]
|
||||
**myString** | **String** | | [optional]
|
||||
**myBoolean** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# OpenApiPetstore.OuterEnum
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `placed` (value: `"placed"`)
|
||||
|
||||
* `approved` (value: `"approved"`)
|
||||
|
||||
* `delivered` (value: `"delivered"`)
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# SwaggerPetstore.OuterNumber
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# SwaggerPetstore.OuterString
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
26
samples/openapi3/client/petstore/javascript-es6/docs/Pet.md
Normal file
26
samples/openapi3/client/petstore/javascript-es6/docs/Pet.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# OpenApiPetstore.Pet
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Number** | | [optional]
|
||||
**category** | [**Category**](Category.md) | | [optional]
|
||||
**name** | **String** | |
|
||||
**photoUrls** | **[String]** | |
|
||||
**tags** | [**[Tag]**](Tag.md) | | [optional]
|
||||
**status** | **String** | pet status in the store | [optional]
|
||||
|
||||
|
||||
<a name="StatusEnum"></a>
|
||||
## Enum: StatusEnum
|
||||
|
||||
|
||||
* `available` (value: `"available"`)
|
||||
|
||||
* `pending` (value: `"pending"`)
|
||||
|
||||
* `sold` (value: `"sold"`)
|
||||
|
||||
|
||||
|
||||
|
||||
452
samples/openapi3/client/petstore/javascript-es6/docs/PetApi.md
Normal file
452
samples/openapi3/client/petstore/javascript-es6/docs/PetApi.md
Normal file
@@ -0,0 +1,452 @@
|
||||
# OpenApiPetstore.PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
|
||||
|
||||
<a name="addPet"></a>
|
||||
# **addPet**
|
||||
> addPet(pet)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
|
||||
apiInstance.addPet(pet, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="deletePet"></a>
|
||||
# **deletePet**
|
||||
> deletePet(petId, opts)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let petId = 789; // Number | Pet id to delete
|
||||
let opts = {
|
||||
'apiKey': "apiKey_example" // String |
|
||||
};
|
||||
apiInstance.deletePet(petId, opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Number**| Pet id to delete |
|
||||
**apiKey** | **String**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="findPetsByStatus"></a>
|
||||
# **findPetsByStatus**
|
||||
> [Pet] findPetsByStatus(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let status = ["'available'"]; // [String] | Status values that need to be considered for filter
|
||||
apiInstance.findPetsByStatus(status, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**[String]**](String.md)| Status values that need to be considered for filter |
|
||||
|
||||
### Return type
|
||||
|
||||
[**[Pet]**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="findPetsByTags"></a>
|
||||
# **findPetsByTags**
|
||||
> [Pet] findPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let tags = ["null"]; // [String] | Tags to filter by
|
||||
apiInstance.findPetsByTags(tags, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**[String]**](String.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
[**[Pet]**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="getPetById"></a>
|
||||
# **getPetById**
|
||||
> Pet getPetById(petId)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
let api_key = defaultClient.authentications['api_key'];
|
||||
api_key.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let petId = 789; // Number | ID of pet to return
|
||||
apiInstance.getPetById(petId, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Number**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="updatePet"></a>
|
||||
# **updatePet**
|
||||
> updatePet(pet)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
|
||||
apiInstance.updatePet(pet, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="updatePetWithForm"></a>
|
||||
# **updatePetWithForm**
|
||||
> updatePetWithForm(petId, opts)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let petId = 789; // Number | ID of pet that needs to be updated
|
||||
let opts = {
|
||||
'name': "name_example", // String | Updated name of the pet
|
||||
'status': "status_example" // String | Updated status of the pet
|
||||
};
|
||||
apiInstance.updatePetWithForm(petId, opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Number**| ID of pet that needs to be updated |
|
||||
**name** | **String**| Updated name of the pet | [optional]
|
||||
**status** | **String**| Updated status of the pet | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="uploadFile"></a>
|
||||
# **uploadFile**
|
||||
> ApiResponse uploadFile(petId, opts)
|
||||
|
||||
uploads an image
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let petId = 789; // Number | ID of pet to update
|
||||
let opts = {
|
||||
'additionalMetadata': "additionalMetadata_example", // String | Additional data to pass to server
|
||||
'file': "/path/to/file" // File | file to upload
|
||||
};
|
||||
apiInstance.uploadFile(petId, opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Number**| ID of pet to update |
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
|
||||
**file** | **File**| file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let petId = 789; // Number | ID of pet to update
|
||||
let requiredFile = "/path/to/file"; // File | file to upload
|
||||
let opts = {
|
||||
'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
|
||||
};
|
||||
apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Number**| ID of pet to update |
|
||||
**requiredFile** | **File**| file to upload |
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.ReadOnlyFirst
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional]
|
||||
**baz** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.SpecialModelName
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**specialPropertyName** | **Number** | | [optional]
|
||||
|
||||
|
||||
181
samples/openapi3/client/petstore/javascript-es6/docs/StoreApi.md
Normal file
181
samples/openapi3/client/petstore/javascript-es6/docs/StoreApi.md
Normal file
@@ -0,0 +1,181 @@
|
||||
# OpenApiPetstore.StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
<a name="deleteOrder"></a>
|
||||
# **deleteOrder**
|
||||
> deleteOrder(orderId)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.StoreApi();
|
||||
let orderId = "orderId_example"; // String | ID of the order that needs to be deleted
|
||||
apiInstance.deleteOrder(orderId, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **String**| ID of the order that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="getInventory"></a>
|
||||
# **getInventory**
|
||||
> {String: Number} getInventory()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
let api_key = defaultClient.authentications['api_key'];
|
||||
api_key.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.StoreApi();
|
||||
apiInstance.getInventory((error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**{String: Number}**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getOrderById"></a>
|
||||
# **getOrderById**
|
||||
> Order getOrderById(orderId)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.StoreApi();
|
||||
let orderId = 789; // Number | ID of pet that needs to be fetched
|
||||
apiInstance.getOrderById(orderId, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **Number**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="placeOrder"></a>
|
||||
# **placeOrder**
|
||||
> Order placeOrder(order)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.StoreApi();
|
||||
let order = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet
|
||||
apiInstance.placeOrder(order, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# OpenApiPetstore.StringBooleanMap
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.Tag
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Number** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# OpenApiPetstore.TypeHolderDefault
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**stringItem** | **String** | | [default to 'what']
|
||||
**numberItem** | **Number** | |
|
||||
**integerItem** | **Number** | |
|
||||
**boolItem** | **Boolean** | | [default to true]
|
||||
**arrayItem** | **[Number]** | |
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# OpenApiPetstore.TypeHolderExample
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**stringItem** | **String** | |
|
||||
**numberItem** | **Number** | |
|
||||
**integerItem** | **Number** | |
|
||||
**boolItem** | **Boolean** | |
|
||||
**arrayItem** | **[Number]** | |
|
||||
|
||||
|
||||
15
samples/openapi3/client/petstore/javascript-es6/docs/User.md
Normal file
15
samples/openapi3/client/petstore/javascript-es6/docs/User.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# OpenApiPetstore.User
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Number** | | [optional]
|
||||
**username** | **String** | | [optional]
|
||||
**firstName** | **String** | | [optional]
|
||||
**lastName** | **String** | | [optional]
|
||||
**email** | **String** | | [optional]
|
||||
**password** | **String** | | [optional]
|
||||
**phone** | **String** | | [optional]
|
||||
**userStatus** | **Number** | User Status | [optional]
|
||||
|
||||
|
||||
342
samples/openapi3/client/petstore/javascript-es6/docs/UserApi.md
Normal file
342
samples/openapi3/client/petstore/javascript-es6/docs/UserApi.md
Normal file
@@ -0,0 +1,342 @@
|
||||
# OpenApiPetstore.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createUser**](UserApi.md#createUser) | **POST** /user | Create user
|
||||
[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
<a name="createUser"></a>
|
||||
# **createUser**
|
||||
> createUser(user)
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
let user = new OpenApiPetstore.User(); // User | Created user object
|
||||
apiInstance.createUser(user, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="createUsersWithArrayInput"></a>
|
||||
# **createUsersWithArrayInput**
|
||||
> createUsersWithArrayInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
let user = [new OpenApiPetstore.User()]; // [User] | List of user object
|
||||
apiInstance.createUsersWithArrayInput(user, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**[User]**](Array.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="createUsersWithListInput"></a>
|
||||
# **createUsersWithListInput**
|
||||
> createUsersWithListInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
let user = [new OpenApiPetstore.User()]; // [User] | List of user object
|
||||
apiInstance.createUsersWithListInput(user, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**[User]**](Array.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="deleteUser"></a>
|
||||
# **deleteUser**
|
||||
> deleteUser(username)
|
||||
|
||||
Delete user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
let username = "username_example"; // String | The name that needs to be deleted
|
||||
apiInstance.deleteUser(username, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="getUserByName"></a>
|
||||
# **getUserByName**
|
||||
> User getUserByName(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
let username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
apiInstance.getUserByName(username, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="loginUser"></a>
|
||||
# **loginUser**
|
||||
> String loginUser(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
let username = "username_example"; // String | The user name for login
|
||||
let password = "password_example"; // String | The password for login in clear text
|
||||
apiInstance.loginUser(username, password, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The user name for login |
|
||||
**password** | **String**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="logoutUser"></a>
|
||||
# **logoutUser**
|
||||
> logoutUser()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
apiInstance.logoutUser((error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="updateUser"></a>
|
||||
# **updateUser**
|
||||
> updateUser(username, user)
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
let username = "username_example"; // String | name that need to be deleted
|
||||
let user = new OpenApiPetstore.User(); // User | Updated user object
|
||||
apiInstance.updateUser(username, user, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| name that need to be deleted |
|
||||
**user** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
52
samples/openapi3/client/petstore/javascript-es6/git_push.sh
Normal file
52
samples/openapi3/client/petstore/javascript-es6/git_push.sh
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the Git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
--timeout 10000
|
||||
3511
samples/openapi3/client/petstore/javascript-es6/package-lock.json
generated
Normal file
3511
samples/openapi3/client/petstore/javascript-es6/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
26
samples/openapi3/client/petstore/javascript-es6/package.json
Normal file
26
samples/openapi3/client/petstore/javascript-es6/package.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "open_api_petstore",
|
||||
"version": "1.0.0",
|
||||
"description": "This_spec_is_mainly_for_testing_Petstore_server_and_contains_fake_endpoints_models__Please_do_not_use_this_for_any_other_purpose__Special_characters__",
|
||||
"license": "Apache-2.0",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"test": "mocha --compilers js:babel-core/register --recursive"
|
||||
},
|
||||
"browser": {
|
||||
"fs": false
|
||||
},
|
||||
"dependencies": {
|
||||
"babel": "^6.23.0",
|
||||
"babel-cli": "^6.26.0",
|
||||
"superagent": "3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "6.26.0",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"expect.js": "~0.3.1",
|
||||
"mocha": "^5.2.0",
|
||||
"sinon": "1.17.3"
|
||||
}
|
||||
}
|
||||
45
samples/openapi3/client/petstore/javascript-es6/pom.xml
Normal file
45
samples/openapi3/client/petstore/javascript-es6/pom.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-v3-petstore-javascript-es6</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>OpenAPI v3 Petstore JS Client (ES6)</name>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>npm-install</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>npm</executable>
|
||||
<arguments>
|
||||
<argument>install</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>mocha</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>npm</executable>
|
||||
<arguments>
|
||||
<argument>test</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
675
samples/openapi3/client/petstore/javascript-es6/src/ApiClient.js
Normal file
675
samples/openapi3/client/petstore/javascript-es6/src/ApiClient.js
Normal file
@@ -0,0 +1,675 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import superagent from "superagent";
|
||||
import querystring from "querystring";
|
||||
|
||||
/**
|
||||
* @module ApiClient
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
|
||||
* application to use this class directly - the *Api and model classes provide the public API for the service. The
|
||||
* contents of this file should be regarded as internal but are documented for completeness.
|
||||
* @alias module:ApiClient
|
||||
* @class
|
||||
*/
|
||||
class ApiClient {
|
||||
constructor() {
|
||||
/**
|
||||
* The base URL against which to resolve every API call's (relative) path.
|
||||
* @type {String}
|
||||
* @default http://petstore.swagger.io:80/v2
|
||||
*/
|
||||
this.basePath = 'http://petstore.swagger.io:80/v2'.replace(/\/+$/, '');
|
||||
|
||||
/**
|
||||
* The authentication methods to be included for all API calls.
|
||||
* @type {Array.<String>}
|
||||
*/
|
||||
this.authentications = {
|
||||
'api_key': {type: 'apiKey', 'in': 'header', name: 'api_key'},
|
||||
'api_key_query': {type: 'apiKey', 'in': 'query', name: 'api_key_query'},
|
||||
'http_basic_test': {type: 'basic'},
|
||||
'petstore_auth': {type: 'oauth2'}
|
||||
}
|
||||
|
||||
/**
|
||||
* The default HTTP headers to be included for all API calls.
|
||||
* @type {Array.<String>}
|
||||
* @default {}
|
||||
*/
|
||||
this.defaultHeaders = {};
|
||||
|
||||
/**
|
||||
* The default HTTP timeout for all API calls.
|
||||
* @type {Number}
|
||||
* @default 60000
|
||||
*/
|
||||
this.timeout = 60000;
|
||||
|
||||
/**
|
||||
* If set to false an additional timestamp parameter is added to all API GET calls to
|
||||
* prevent browser caching
|
||||
* @type {Boolean}
|
||||
* @default true
|
||||
*/
|
||||
this.cache = true;
|
||||
|
||||
/**
|
||||
* If set to true, the client will save the cookies from each server
|
||||
* response, and return them in the next request.
|
||||
* @default false
|
||||
*/
|
||||
this.enableCookies = false;
|
||||
|
||||
/*
|
||||
* Used to save and return cookies in a node.js (non-browser) setting,
|
||||
* if this.enableCookies is set to true.
|
||||
*/
|
||||
if (typeof window === 'undefined') {
|
||||
this.agent = new superagent.agent();
|
||||
}
|
||||
|
||||
/*
|
||||
* Allow user to override superagent agent
|
||||
*/
|
||||
this.requestAgent = null;
|
||||
|
||||
/*
|
||||
* Allow user to add superagent plugins
|
||||
*/
|
||||
this.plugins = null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation for an actual parameter.
|
||||
* @param param The actual parameter.
|
||||
* @returns {String} The string representation of <code>param</code>.
|
||||
*/
|
||||
paramToString(param) {
|
||||
if (param == undefined || param == null) {
|
||||
return '';
|
||||
}
|
||||
if (param instanceof Date) {
|
||||
return param.toJSON();
|
||||
}
|
||||
|
||||
return param.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.
|
||||
* NOTE: query parameters are not handled here.
|
||||
* @param {String} path The path to append to the base URL.
|
||||
* @param {Object} pathParams The parameter values to append.
|
||||
* @returns {String} The encoded path with parameter values substituted.
|
||||
*/
|
||||
buildUrl(path, pathParams) {
|
||||
if (!path.match(/^\//)) {
|
||||
path = '/' + path;
|
||||
}
|
||||
|
||||
var url = this.basePath + path;
|
||||
url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => {
|
||||
var value;
|
||||
if (pathParams.hasOwnProperty(key)) {
|
||||
value = this.paramToString(pathParams[key]);
|
||||
} else {
|
||||
value = fullMatch;
|
||||
}
|
||||
|
||||
return encodeURIComponent(value);
|
||||
});
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given content type represents JSON.<br>
|
||||
* JSON content type examples:<br>
|
||||
* <ul>
|
||||
* <li>application/json</li>
|
||||
* <li>application/json; charset=UTF8</li>
|
||||
* <li>APPLICATION/JSON</li>
|
||||
* </ul>
|
||||
* @param {String} contentType The MIME content type to check.
|
||||
* @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
|
||||
*/
|
||||
isJsonMime(contentType) {
|
||||
return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
|
||||
}
|
||||
|
||||
/**
|
||||
* Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
|
||||
* @param {Array.<String>} contentTypes
|
||||
* @returns {String} The chosen content type, preferring JSON.
|
||||
*/
|
||||
jsonPreferredMime(contentTypes) {
|
||||
for (var i = 0; i < contentTypes.length; i++) {
|
||||
if (this.isJsonMime(contentTypes[i])) {
|
||||
return contentTypes[i];
|
||||
}
|
||||
}
|
||||
|
||||
return contentTypes[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given parameter value represents file-like content.
|
||||
* @param param The parameter to check.
|
||||
* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
|
||||
*/
|
||||
isFileParam(param) {
|
||||
// fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
|
||||
if (typeof require === 'function') {
|
||||
let fs;
|
||||
try {
|
||||
fs = require('fs');
|
||||
} catch (err) {}
|
||||
if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Buffer in Node.js
|
||||
if (typeof Buffer === 'function' && param instanceof Buffer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Blob in browser
|
||||
if (typeof Blob === 'function' && param instanceof Blob) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// File in browser (it seems File object is also instance of Blob, but keep this for safe)
|
||||
if (typeof File === 'function' && param instanceof File) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes parameter values:
|
||||
* <ul>
|
||||
* <li>remove nils</li>
|
||||
* <li>keep files and arrays</li>
|
||||
* <li>format to string with `paramToString` for other cases</li>
|
||||
* </ul>
|
||||
* @param {Object.<String, Object>} params The parameters as object properties.
|
||||
* @returns {Object.<String, Object>} normalized parameters.
|
||||
*/
|
||||
normalizeParams(params) {
|
||||
var newParams = {};
|
||||
for (var key in params) {
|
||||
if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {
|
||||
var value = params[key];
|
||||
if (this.isFileParam(value) || Array.isArray(value)) {
|
||||
newParams[key] = value;
|
||||
} else {
|
||||
newParams[key] = this.paramToString(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return newParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a string representation of an array-type actual parameter, according to the given collection format.
|
||||
* @param {Array} param An array parameter.
|
||||
* @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.
|
||||
* @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns
|
||||
* <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
|
||||
*/
|
||||
buildCollectionParam(param, collectionFormat) {
|
||||
if (param == null) {
|
||||
return null;
|
||||
}
|
||||
switch (collectionFormat) {
|
||||
case 'csv':
|
||||
return param.map(this.paramToString).join(',');
|
||||
case 'ssv':
|
||||
return param.map(this.paramToString).join(' ');
|
||||
case 'tsv':
|
||||
return param.map(this.paramToString).join('\t');
|
||||
case 'pipes':
|
||||
return param.map(this.paramToString).join('|');
|
||||
case 'multi':
|
||||
//return the array directly as SuperAgent will handle it as expected
|
||||
return param.map(this.paramToString);
|
||||
default:
|
||||
throw new Error('Unknown collection format: ' + collectionFormat);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies authentication headers to the request.
|
||||
* @param {Object} request The request object created by a <code>superagent()</code> call.
|
||||
* @param {Array.<String>} authNames An array of authentication method names.
|
||||
*/
|
||||
applyAuthToRequest(request, authNames) {
|
||||
authNames.forEach((authName) => {
|
||||
var auth = this.authentications[authName];
|
||||
switch (auth.type) {
|
||||
case 'basic':
|
||||
if (auth.username || auth.password) {
|
||||
request.auth(auth.username || '', auth.password || '');
|
||||
}
|
||||
|
||||
break;
|
||||
case 'apiKey':
|
||||
if (auth.apiKey) {
|
||||
var data = {};
|
||||
if (auth.apiKeyPrefix) {
|
||||
data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;
|
||||
} else {
|
||||
data[auth.name] = auth.apiKey;
|
||||
}
|
||||
|
||||
if (auth['in'] === 'header') {
|
||||
request.set(data);
|
||||
} else {
|
||||
request.query(data);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 'oauth2':
|
||||
if (auth.accessToken) {
|
||||
request.set({'Authorization': 'Bearer ' + auth.accessToken});
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
throw new Error('Unknown authentication type: ' + auth.type);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes an HTTP response body into a value of the specified type.
|
||||
* @param {Object} response A SuperAgent response object.
|
||||
* @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types
|
||||
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
|
||||
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
|
||||
* all properties on <code>data<code> will be converted to this type.
|
||||
* @returns A value of the specified type.
|
||||
*/
|
||||
deserialize(response, returnType) {
|
||||
if (response == null || returnType == null || response.status == 204) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Rely on SuperAgent for parsing response body.
|
||||
// See http://visionmedia.github.io/superagent/#parsing-response-bodies
|
||||
var data = response.body;
|
||||
if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {
|
||||
// SuperAgent does not always produce a body; use the unparsed response as a fallback
|
||||
data = response.text;
|
||||
}
|
||||
|
||||
return ApiClient.convertToType(data, returnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the operation.
|
||||
* @callback module:ApiClient~callApiCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Invokes the REST service using the supplied settings and parameters.
|
||||
* @param {String} path The base URL to invoke.
|
||||
* @param {String} httpMethod The HTTP method to use.
|
||||
* @param {Object.<String, String>} pathParams A map of path parameters and their values.
|
||||
* @param {Object.<String, Object>} queryParams A map of query parameters and their values.
|
||||
* @param {Object.<String, Object>} headerParams A map of header parameters and their values.
|
||||
* @param {Object.<String, Object>} formParams A map of form parameters and their values.
|
||||
* @param {Object} bodyParam The value to pass as the request body.
|
||||
* @param {Array.<String>} authNames An array of authentication type names.
|
||||
* @param {Array.<String>} contentTypes An array of request MIME types.
|
||||
* @param {Array.<String>} accepts An array of acceptable response MIME types.
|
||||
* @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the
|
||||
* constructor for a complex type.
|
||||
* @param {module:ApiClient~callApiCallback} callback The callback function.
|
||||
* @returns {Object} The SuperAgent request object.
|
||||
*/
|
||||
callApi(path, httpMethod, pathParams,
|
||||
queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,
|
||||
returnType, callback) {
|
||||
|
||||
var url = this.buildUrl(path, pathParams);
|
||||
var request = superagent(httpMethod, url);
|
||||
|
||||
if (this.plugins !== null) {
|
||||
for (var index in this.plugins) {
|
||||
if (this.plugins.hasOwnProperty(index)) {
|
||||
request.use(this.plugins[index])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// apply authentications
|
||||
this.applyAuthToRequest(request, authNames);
|
||||
|
||||
// set query parameters
|
||||
if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {
|
||||
queryParams['_'] = new Date().getTime();
|
||||
}
|
||||
|
||||
request.query(this.normalizeParams(queryParams));
|
||||
|
||||
// set header parameters
|
||||
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
|
||||
|
||||
// set requestAgent if it is set by user
|
||||
if (this.requestAgent) {
|
||||
request.agent(this.requestAgent);
|
||||
}
|
||||
|
||||
// set request timeout
|
||||
request.timeout(this.timeout);
|
||||
|
||||
var contentType = this.jsonPreferredMime(contentTypes);
|
||||
if (contentType) {
|
||||
// Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)
|
||||
if(contentType != 'multipart/form-data') {
|
||||
request.type(contentType);
|
||||
}
|
||||
} else if (!request.header['Content-Type']) {
|
||||
request.type('application/json');
|
||||
}
|
||||
|
||||
if (contentType === 'application/x-www-form-urlencoded') {
|
||||
request.send(querystring.stringify(this.normalizeParams(formParams)));
|
||||
} else if (contentType == 'multipart/form-data') {
|
||||
var _formParams = this.normalizeParams(formParams);
|
||||
for (var key in _formParams) {
|
||||
if (_formParams.hasOwnProperty(key)) {
|
||||
if (this.isFileParam(_formParams[key])) {
|
||||
// file field
|
||||
request.attach(key, _formParams[key]);
|
||||
} else {
|
||||
request.field(key, _formParams[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (bodyParam !== null && bodyParam !== undefined) {
|
||||
request.send(bodyParam);
|
||||
}
|
||||
|
||||
var accept = this.jsonPreferredMime(accepts);
|
||||
if (accept) {
|
||||
request.accept(accept);
|
||||
}
|
||||
|
||||
if (returnType === 'Blob') {
|
||||
request.responseType('blob');
|
||||
} else if (returnType === 'String') {
|
||||
request.responseType('string');
|
||||
}
|
||||
|
||||
// Attach previously saved cookies, if enabled
|
||||
if (this.enableCookies){
|
||||
if (typeof window === 'undefined') {
|
||||
this.agent._attachCookies(request);
|
||||
}
|
||||
else {
|
||||
request.withCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
request.end((error, response) => {
|
||||
if (callback) {
|
||||
var data = null;
|
||||
if (!error) {
|
||||
try {
|
||||
data = this.deserialize(response, returnType);
|
||||
if (this.enableCookies && typeof window === 'undefined'){
|
||||
this.agent._saveCookies(response);
|
||||
}
|
||||
} catch (err) {
|
||||
error = err;
|
||||
}
|
||||
}
|
||||
|
||||
callback(error, data, response);
|
||||
}
|
||||
});
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses an ISO-8601 string representation of a date value.
|
||||
* @param {String} str The date value as a string.
|
||||
* @returns {Date} The parsed date object.
|
||||
*/
|
||||
static parseDate(str) {
|
||||
return new Date(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a value to the specified type.
|
||||
* @param {(String|Object)} data The data to convert, as a string or object.
|
||||
* @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types
|
||||
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
|
||||
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
|
||||
* all properties on <code>data<code> will be converted to this type.
|
||||
* @returns An instance of the specified type or null or undefined if data is null or undefined.
|
||||
*/
|
||||
static convertToType(data, type) {
|
||||
if (data === null || data === undefined)
|
||||
return data
|
||||
|
||||
switch (type) {
|
||||
case 'Boolean':
|
||||
return Boolean(data);
|
||||
case 'Integer':
|
||||
return parseInt(data, 10);
|
||||
case 'Number':
|
||||
return parseFloat(data);
|
||||
case 'String':
|
||||
return String(data);
|
||||
case 'Date':
|
||||
return ApiClient.parseDate(String(data));
|
||||
case 'Blob':
|
||||
return data;
|
||||
default:
|
||||
if (type === Object) {
|
||||
// generic object, return directly
|
||||
return data;
|
||||
} else if (typeof type.constructFromObject === 'function') {
|
||||
// for model type like User and enum class
|
||||
return type.constructFromObject(data);
|
||||
} else if (Array.isArray(type)) {
|
||||
// for array type like: ['String']
|
||||
var itemType = type[0];
|
||||
|
||||
return data.map((item) => {
|
||||
return ApiClient.convertToType(item, itemType);
|
||||
});
|
||||
} else if (typeof type === 'object') {
|
||||
// for plain object type like: {'String': 'Integer'}
|
||||
var keyType, valueType;
|
||||
for (var k in type) {
|
||||
if (type.hasOwnProperty(k)) {
|
||||
keyType = k;
|
||||
valueType = type[k];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var result = {};
|
||||
for (var k in data) {
|
||||
if (data.hasOwnProperty(k)) {
|
||||
var key = ApiClient.convertToType(k, keyType);
|
||||
var value = ApiClient.convertToType(data[k], valueType);
|
||||
result[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
} else {
|
||||
// for unknown type, return the data directly
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of host settings
|
||||
* @returns An array of host settings
|
||||
*/
|
||||
hostSettings() {
|
||||
return [
|
||||
{
|
||||
'url': "http://{server}.swagger.io:{port}/v2",
|
||||
'description': "petstore server",
|
||||
'variables': {
|
||||
server: {
|
||||
'description': "No description provided",
|
||||
'default_value': "petstore",
|
||||
'enum_values': [
|
||||
"petstore",
|
||||
"qa-petstore",
|
||||
"dev-petstore"
|
||||
]
|
||||
},
|
||||
port: {
|
||||
'description': "No description provided",
|
||||
'default_value': "80",
|
||||
'enum_values': [
|
||||
"80",
|
||||
"8080"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
'url': "https://localhost:8080/{version}",
|
||||
'description': "The local server",
|
||||
'variables': {
|
||||
version: {
|
||||
'description': "No description provided",
|
||||
'default_value': "v2",
|
||||
'enum_values': [
|
||||
"v1",
|
||||
"v2"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
getBasePathFromSettings(index, variables={}) {
|
||||
var servers = this.hostSettings();
|
||||
|
||||
// check array index out of bound
|
||||
if (index < 0 || index >= servers.length) {
|
||||
throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length);
|
||||
}
|
||||
|
||||
var server = servers[index];
|
||||
var url = server['url'];
|
||||
|
||||
// go through variable and assign a value
|
||||
for (var variable_name in server['variables']) {
|
||||
if (variable_name in variables) {
|
||||
if (server['variables'][variable_name]['enum_values'].includes(variables[variable_name])) {
|
||||
url = url.replace("{" + variable_name + "}", variables[variable_name]);
|
||||
} else {
|
||||
throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + ".");
|
||||
}
|
||||
} else {
|
||||
// use default value
|
||||
url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value'])
|
||||
}
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new map or array model from REST data.
|
||||
* @param data {Object|Array} The REST data.
|
||||
* @param obj {Object|Array} The target object or array.
|
||||
*/
|
||||
static constructFromObject(data, obj, itemType) {
|
||||
if (Array.isArray(data)) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (data.hasOwnProperty(i))
|
||||
obj[i] = ApiClient.convertToType(data[i], itemType);
|
||||
}
|
||||
} else {
|
||||
for (var k in data) {
|
||||
if (data.hasOwnProperty(k))
|
||||
obj[k] = ApiClient.convertToType(data[k], itemType);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Enumeration of collection format separator strategies.
|
||||
* @enum {String}
|
||||
* @readonly
|
||||
*/
|
||||
ApiClient.CollectionFormatEnum = {
|
||||
/**
|
||||
* Comma-separated values. Value: <code>csv</code>
|
||||
* @const
|
||||
*/
|
||||
CSV: ',',
|
||||
|
||||
/**
|
||||
* Space-separated values. Value: <code>ssv</code>
|
||||
* @const
|
||||
*/
|
||||
SSV: ' ',
|
||||
|
||||
/**
|
||||
* Tab-separated values. Value: <code>tsv</code>
|
||||
* @const
|
||||
*/
|
||||
TSV: '\t',
|
||||
|
||||
/**
|
||||
* Pipe(|)-separated values. Value: <code>pipes</code>
|
||||
* @const
|
||||
*/
|
||||
PIPES: '|',
|
||||
|
||||
/**
|
||||
* Native array. Value: <code>multi</code>
|
||||
* @const
|
||||
*/
|
||||
MULTI: 'multi'
|
||||
};
|
||||
|
||||
/**
|
||||
* The default API client implementation.
|
||||
* @type {module:ApiClient}
|
||||
*/
|
||||
ApiClient.instance = new ApiClient();
|
||||
export default ApiClient;
|
||||
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
|
||||
/**
|
||||
* AnotherFake service.
|
||||
* @module api/AnotherFakeApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class AnotherFakeApi {
|
||||
|
||||
/**
|
||||
* Constructs a new AnotherFakeApi.
|
||||
* @alias module:api/AnotherFakeApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the call123testSpecialTags operation.
|
||||
* @callback module:api/AnotherFakeApi~call123testSpecialTagsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/Client} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param {module:model/Client} client client model
|
||||
* @param {module:api/AnotherFakeApi~call123testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Client}
|
||||
*/
|
||||
call123testSpecialTags(client, callback) {
|
||||
let postBody = client;
|
||||
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Client;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/another-fake/dummy', 'PATCH',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import InlineResponseDefault from '../model/InlineResponseDefault';
|
||||
|
||||
/**
|
||||
* Default service.
|
||||
* @module api/DefaultApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class DefaultApi {
|
||||
|
||||
/**
|
||||
* Constructs a new DefaultApi.
|
||||
* @alias module:api/DefaultApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the fooGet operation.
|
||||
* @callback module:api/DefaultApi~fooGetCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/InlineResponseDefault} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {module:api/DefaultApi~fooGetCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/InlineResponseDefault}
|
||||
*/
|
||||
fooGet(callback) {
|
||||
let postBody = null;
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = InlineResponseDefault;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/foo', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,647 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
import FileSchemaTestClass from '../model/FileSchemaTestClass';
|
||||
import OuterComposite from '../model/OuterComposite';
|
||||
import User from '../model/User';
|
||||
|
||||
/**
|
||||
* Fake service.
|
||||
* @module api/FakeApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class FakeApi {
|
||||
|
||||
/**
|
||||
* Constructs a new FakeApi.
|
||||
* @alias module:api/FakeApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the fakeOuterBooleanSerialize operation.
|
||||
* @callback module:api/FakeApi~fakeOuterBooleanSerializeCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {Boolean} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test serialization of outer boolean types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Boolean} opts.body Input boolean as post body
|
||||
* @param {module:api/FakeApi~fakeOuterBooleanSerializeCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link Boolean}
|
||||
*/
|
||||
fakeOuterBooleanSerialize(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = opts['body'];
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['*/*'];
|
||||
let returnType = 'Boolean';
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/outer/boolean', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the fakeOuterCompositeSerialize operation.
|
||||
* @callback module:api/FakeApi~fakeOuterCompositeSerializeCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/OuterComposite} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test serialization of object with outer number type
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
|
||||
* @param {module:api/FakeApi~fakeOuterCompositeSerializeCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/OuterComposite}
|
||||
*/
|
||||
fakeOuterCompositeSerialize(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = opts['outerComposite'];
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['*/*'];
|
||||
let returnType = OuterComposite;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/outer/composite', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the fakeOuterNumberSerialize operation.
|
||||
* @callback module:api/FakeApi~fakeOuterNumberSerializeCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {Number} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test serialization of outer number types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Number} opts.body Input number as post body
|
||||
* @param {module:api/FakeApi~fakeOuterNumberSerializeCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link Number}
|
||||
*/
|
||||
fakeOuterNumberSerialize(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = opts['body'];
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['*/*'];
|
||||
let returnType = 'Number';
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/outer/number', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the fakeOuterStringSerialize operation.
|
||||
* @callback module:api/FakeApi~fakeOuterStringSerializeCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {String} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test serialization of outer string types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.body Input string as post body
|
||||
* @param {module:api/FakeApi~fakeOuterStringSerializeCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link String}
|
||||
*/
|
||||
fakeOuterStringSerialize(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = opts['body'];
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['*/*'];
|
||||
let returnType = 'String';
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/outer/string', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testBodyWithFileSchema operation.
|
||||
* @callback module:api/FakeApi~testBodyWithFileSchemaCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
|
||||
* @param {module:api/FakeApi~testBodyWithFileSchemaCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testBodyWithFileSchema(fileSchemaTestClass, callback) {
|
||||
let postBody = fileSchemaTestClass;
|
||||
|
||||
// verify the required parameter 'fileSchemaTestClass' is set
|
||||
if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
|
||||
throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/body-with-file-schema', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testBodyWithQueryParams operation.
|
||||
* @callback module:api/FakeApi~testBodyWithQueryParamsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {String} query
|
||||
* @param {module:model/User} user
|
||||
* @param {module:api/FakeApi~testBodyWithQueryParamsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testBodyWithQueryParams(query, user, callback) {
|
||||
let postBody = user;
|
||||
|
||||
// verify the required parameter 'query' is set
|
||||
if (query === undefined || query === null) {
|
||||
throw new Error("Missing the required parameter 'query' when calling testBodyWithQueryParams");
|
||||
}
|
||||
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling testBodyWithQueryParams");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'query': query
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/body-with-query-params', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testClientModel operation.
|
||||
* @callback module:api/FakeApi~testClientModelCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/Client} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param {module:model/Client} client client model
|
||||
* @param {module:api/FakeApi~testClientModelCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Client}
|
||||
*/
|
||||
testClientModel(client, callback) {
|
||||
let postBody = client;
|
||||
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling testClientModel");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Client;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake', 'PATCH',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testEndpointParameters operation.
|
||||
* @callback module:api/FakeApi~testEndpointParametersCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param {Number} _number None
|
||||
* @param {Number} _double None
|
||||
* @param {String} patternWithoutDelimiter None
|
||||
* @param {Blob} _byte None
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Number} opts.integer None
|
||||
* @param {Number} opts.int32 None
|
||||
* @param {Number} opts.int64 None
|
||||
* @param {Number} opts._float None
|
||||
* @param {String} opts._string None
|
||||
* @param {File} opts.binary None
|
||||
* @param {Date} opts._date None
|
||||
* @param {Date} opts.dateTime None
|
||||
* @param {String} opts.password None
|
||||
* @param {String} opts.callback None
|
||||
* @param {module:api/FakeApi~testEndpointParametersCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter '_number' is set
|
||||
if (_number === undefined || _number === null) {
|
||||
throw new Error("Missing the required parameter '_number' when calling testEndpointParameters");
|
||||
}
|
||||
|
||||
// verify the required parameter '_double' is set
|
||||
if (_double === undefined || _double === null) {
|
||||
throw new Error("Missing the required parameter '_double' when calling testEndpointParameters");
|
||||
}
|
||||
|
||||
// verify the required parameter 'patternWithoutDelimiter' is set
|
||||
if (patternWithoutDelimiter === undefined || patternWithoutDelimiter === null) {
|
||||
throw new Error("Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters");
|
||||
}
|
||||
|
||||
// verify the required parameter '_byte' is set
|
||||
if (_byte === undefined || _byte === null) {
|
||||
throw new Error("Missing the required parameter '_byte' when calling testEndpointParameters");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
'integer': opts['integer'],
|
||||
'int32': opts['int32'],
|
||||
'int64': opts['int64'],
|
||||
'number': _number,
|
||||
'float': opts['_float'],
|
||||
'double': _double,
|
||||
'string': opts['_string'],
|
||||
'pattern_without_delimiter': patternWithoutDelimiter,
|
||||
'byte': _byte,
|
||||
'binary': opts['binary'],
|
||||
'date': opts['_date'],
|
||||
'dateTime': opts['dateTime'],
|
||||
'password': opts['password'],
|
||||
'callback': opts['callback']
|
||||
};
|
||||
|
||||
let authNames = ['http_basic_test'];
|
||||
let contentTypes = ['application/x-www-form-urlencoded'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testEnumParameters operation.
|
||||
* @callback module:api/FakeApi~testEnumParametersCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Array.<module:model/String>} opts.enumHeaderStringArray Header parameter enum test (string array)
|
||||
* @param {module:model/String} opts.enumHeaderString Header parameter enum test (string) (default to '-efg')
|
||||
* @param {Array.<module:model/String>} opts.enumQueryStringArray Query parameter enum test (string array)
|
||||
* @param {module:model/String} opts.enumQueryString Query parameter enum test (string) (default to '-efg')
|
||||
* @param {module:model/Number} opts.enumQueryInteger Query parameter enum test (double)
|
||||
* @param {module:model/Number} opts.enumQueryDouble Query parameter enum test (double)
|
||||
* @param {Array.<module:model/String>} opts.enumFormStringArray Form parameter enum test (string array) (default to '$')
|
||||
* @param {module:model/String} opts.enumFormString Form parameter enum test (string) (default to '-efg')
|
||||
* @param {module:api/FakeApi~testEnumParametersCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testEnumParameters(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'enum_query_string_array': this.apiClient.buildCollectionParam(opts['enumQueryStringArray'], 'multi'),
|
||||
'enum_query_string': opts['enumQueryString'],
|
||||
'enum_query_integer': opts['enumQueryInteger'],
|
||||
'enum_query_double': opts['enumQueryDouble']
|
||||
};
|
||||
let headerParams = {
|
||||
'enum_header_string_array': opts['enumHeaderStringArray'],
|
||||
'enum_header_string': opts['enumHeaderString']
|
||||
};
|
||||
let formParams = {
|
||||
'enum_form_string_array': this.apiClient.buildCollectionParam(opts['enumFormStringArray'], 'csv'),
|
||||
'enum_form_string': opts['enumFormString']
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/x-www-form-urlencoded'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testGroupParameters operation.
|
||||
* @callback module:api/FakeApi~testGroupParametersCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param {Number} requiredStringGroup Required String in group parameters
|
||||
* @param {Boolean} requiredBooleanGroup Required Boolean in group parameters
|
||||
* @param {Number} requiredInt64Group Required Integer in group parameters
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Number} opts.stringGroup String in group parameters
|
||||
* @param {Boolean} opts.booleanGroup Boolean in group parameters
|
||||
* @param {Number} opts.int64Group Integer in group parameters
|
||||
* @param {module:api/FakeApi~testGroupParametersCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'requiredStringGroup' is set
|
||||
if (requiredStringGroup === undefined || requiredStringGroup === null) {
|
||||
throw new Error("Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
|
||||
}
|
||||
|
||||
// verify the required parameter 'requiredBooleanGroup' is set
|
||||
if (requiredBooleanGroup === undefined || requiredBooleanGroup === null) {
|
||||
throw new Error("Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
|
||||
}
|
||||
|
||||
// verify the required parameter 'requiredInt64Group' is set
|
||||
if (requiredInt64Group === undefined || requiredInt64Group === null) {
|
||||
throw new Error("Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'required_string_group': requiredStringGroup,
|
||||
'required_int64_group': requiredInt64Group,
|
||||
'string_group': opts['stringGroup'],
|
||||
'int64_group': opts['int64Group']
|
||||
};
|
||||
let headerParams = {
|
||||
'required_boolean_group': requiredBooleanGroup,
|
||||
'boolean_group': opts['booleanGroup']
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testInlineAdditionalProperties operation.
|
||||
* @callback module:api/FakeApi~testInlineAdditionalPropertiesCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
* @param {Object.<String, {String: String}>} requestBody request body
|
||||
* @param {module:api/FakeApi~testInlineAdditionalPropertiesCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testInlineAdditionalProperties(requestBody, callback) {
|
||||
let postBody = requestBody;
|
||||
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody === undefined || requestBody === null) {
|
||||
throw new Error("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/inline-additionalProperties', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testJsonFormData operation.
|
||||
* @callback module:api/FakeApi~testJsonFormDataCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
* @param {String} param field1
|
||||
* @param {String} param2 field2
|
||||
* @param {module:api/FakeApi~testJsonFormDataCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testJsonFormData(param, param2, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param === undefined || param === null) {
|
||||
throw new Error("Missing the required parameter 'param' when calling testJsonFormData");
|
||||
}
|
||||
|
||||
// verify the required parameter 'param2' is set
|
||||
if (param2 === undefined || param2 === null) {
|
||||
throw new Error("Missing the required parameter 'param2' when calling testJsonFormData");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
'param': param,
|
||||
'param2': param2
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/x-www-form-urlencoded'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/jsonFormData', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
|
||||
/**
|
||||
* FakeClassnameTags123 service.
|
||||
* @module api/FakeClassnameTags123Api
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* Constructs a new FakeClassnameTags123Api.
|
||||
* @alias module:api/FakeClassnameTags123Api
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testClassname operation.
|
||||
* @callback module:api/FakeClassnameTags123Api~testClassnameCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/Client} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param {module:model/Client} client client model
|
||||
* @param {module:api/FakeClassnameTags123Api~testClassnameCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Client}
|
||||
*/
|
||||
testClassname(client, callback) {
|
||||
let postBody = client;
|
||||
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling testClassname");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['api_key_query'];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Client;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake_classname_test', 'PATCH',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,468 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import ApiResponse from '../model/ApiResponse';
|
||||
import Pet from '../model/Pet';
|
||||
|
||||
/**
|
||||
* Pet service.
|
||||
* @module api/PetApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class PetApi {
|
||||
|
||||
/**
|
||||
* Constructs a new PetApi.
|
||||
* @alias module:api/PetApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the addPet operation.
|
||||
* @callback module:api/PetApi~addPetCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
* @param {module:model/Pet} pet Pet object that needs to be added to the store
|
||||
* @param {module:api/PetApi~addPetCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
addPet(pet, callback) {
|
||||
let postBody = pet;
|
||||
|
||||
// verify the required parameter 'pet' is set
|
||||
if (pet === undefined || pet === null) {
|
||||
throw new Error("Missing the required parameter 'pet' when calling addPet");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['application/json', 'application/xml'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the deletePet operation.
|
||||
* @callback module:api/PetApi~deletePetCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
* @param {Number} petId Pet id to delete
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.apiKey
|
||||
* @param {module:api/PetApi~deletePetCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
deletePet(petId, opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
throw new Error("Missing the required parameter 'petId' when calling deletePet");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'api_key': opts['apiKey']
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the findPetsByStatus operation.
|
||||
* @callback module:api/PetApi~findPetsByStatusCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {Array.<module:model/Pet>} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param {Array.<module:model/String>} status Status values that need to be considered for filter
|
||||
* @param {module:api/PetApi~findPetsByStatusCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link Array.<module:model/Pet>}
|
||||
*/
|
||||
findPetsByStatus(status, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'status' is set
|
||||
if (status === undefined || status === null) {
|
||||
throw new Error("Missing the required parameter 'status' when calling findPetsByStatus");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'status': this.apiClient.buildCollectionParam(status, 'csv')
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = [Pet];
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/findByStatus', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the findPetsByTags operation.
|
||||
* @callback module:api/PetApi~findPetsByTagsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {Array.<module:model/Pet>} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param {Array.<String>} tags Tags to filter by
|
||||
* @param {module:api/PetApi~findPetsByTagsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link Array.<module:model/Pet>}
|
||||
*/
|
||||
findPetsByTags(tags, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags === undefined || tags === null) {
|
||||
throw new Error("Missing the required parameter 'tags' when calling findPetsByTags");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'tags': this.apiClient.buildCollectionParam(tags, 'csv')
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = [Pet];
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/findByTags', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the getPetById operation.
|
||||
* @callback module:api/PetApi~getPetByIdCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/Pet} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param {Number} petId ID of pet to return
|
||||
* @param {module:api/PetApi~getPetByIdCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Pet}
|
||||
*/
|
||||
getPetById(petId, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
throw new Error("Missing the required parameter 'petId' when calling getPetById");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['api_key'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = Pet;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the updatePet operation.
|
||||
* @callback module:api/PetApi~updatePetCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
* @param {module:model/Pet} pet Pet object that needs to be added to the store
|
||||
* @param {module:api/PetApi~updatePetCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
updatePet(pet, callback) {
|
||||
let postBody = pet;
|
||||
|
||||
// verify the required parameter 'pet' is set
|
||||
if (pet === undefined || pet === null) {
|
||||
throw new Error("Missing the required parameter 'pet' when calling updatePet");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['application/json', 'application/xml'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the updatePetWithForm operation.
|
||||
* @callback module:api/PetApi~updatePetWithFormCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
* @param {Number} petId ID of pet that needs to be updated
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.name Updated name of the pet
|
||||
* @param {String} opts.status Updated status of the pet
|
||||
* @param {module:api/PetApi~updatePetWithFormCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
updatePetWithForm(petId, opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
throw new Error("Missing the required parameter 'petId' when calling updatePetWithForm");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
'name': opts['name'],
|
||||
'status': opts['status']
|
||||
};
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['application/x-www-form-urlencoded'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the uploadFile operation.
|
||||
* @callback module:api/PetApi~uploadFileCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/ApiResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
* @param {Number} petId ID of pet to update
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.additionalMetadata Additional data to pass to server
|
||||
* @param {File} opts.file file to upload
|
||||
* @param {module:api/PetApi~uploadFileCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/ApiResponse}
|
||||
*/
|
||||
uploadFile(petId, opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
throw new Error("Missing the required parameter 'petId' when calling uploadFile");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
'additionalMetadata': opts['additionalMetadata'],
|
||||
'file': opts['file']
|
||||
};
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['multipart/form-data'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = ApiResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}/uploadImage', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the uploadFileWithRequiredFile operation.
|
||||
* @callback module:api/PetApi~uploadFileWithRequiredFileCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/ApiResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
* @param {Number} petId ID of pet to update
|
||||
* @param {File} requiredFile file to upload
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.additionalMetadata Additional data to pass to server
|
||||
* @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/ApiResponse}
|
||||
*/
|
||||
uploadFileWithRequiredFile(petId, requiredFile, opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile === undefined || requiredFile === null) {
|
||||
throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
'additionalMetadata': opts['additionalMetadata'],
|
||||
'requiredFile': requiredFile
|
||||
};
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['multipart/form-data'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = ApiResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/{petId}/uploadImageWithRequiredFile', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Order from '../model/Order';
|
||||
|
||||
/**
|
||||
* Store service.
|
||||
* @module api/StoreApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class StoreApi {
|
||||
|
||||
/**
|
||||
* Constructs a new StoreApi.
|
||||
* @alias module:api/StoreApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the deleteOrder operation.
|
||||
* @callback module:api/StoreApi~deleteOrderCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param {String} orderId ID of the order that needs to be deleted
|
||||
* @param {module:api/StoreApi~deleteOrderCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
deleteOrder(orderId, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId === undefined || orderId === null) {
|
||||
throw new Error("Missing the required parameter 'orderId' when calling deleteOrder");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'order_id': orderId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/store/order/{order_id}', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the getInventory operation.
|
||||
* @callback module:api/StoreApi~getInventoryCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {Object.<String, {String: Number}>} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @param {module:api/StoreApi~getInventoryCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link Object.<String, {String: Number}>}
|
||||
*/
|
||||
getInventory(callback) {
|
||||
let postBody = null;
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['api_key'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = {'String': 'Number'};
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/store/inventory', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the getOrderById operation.
|
||||
* @callback module:api/StoreApi~getOrderByIdCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/Order} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param {Number} orderId ID of pet that needs to be fetched
|
||||
* @param {module:api/StoreApi~getOrderByIdCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Order}
|
||||
*/
|
||||
getOrderById(orderId, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId === undefined || orderId === null) {
|
||||
throw new Error("Missing the required parameter 'orderId' when calling getOrderById");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'order_id': orderId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = Order;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/store/order/{order_id}', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the placeOrder operation.
|
||||
* @callback module:api/StoreApi~placeOrderCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/Order} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
* @param {module:model/Order} order order placed for purchasing the pet
|
||||
* @param {module:api/StoreApi~placeOrderCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Order}
|
||||
*/
|
||||
placeOrder(order, callback) {
|
||||
let postBody = order;
|
||||
|
||||
// verify the required parameter 'order' is set
|
||||
if (order === undefined || order === null) {
|
||||
throw new Error("Missing the required parameter 'order' when calling placeOrder");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = Order;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/store/order', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,398 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import User from '../model/User';
|
||||
|
||||
/**
|
||||
* User service.
|
||||
* @module api/UserApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class UserApi {
|
||||
|
||||
/**
|
||||
* Constructs a new UserApi.
|
||||
* @alias module:api/UserApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the createUser operation.
|
||||
* @callback module:api/UserApi~createUserCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {module:model/User} user Created user object
|
||||
* @param {module:api/UserApi~createUserCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
createUser(user, callback) {
|
||||
let postBody = user;
|
||||
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling createUser");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the createUsersWithArrayInput operation.
|
||||
* @callback module:api/UserApi~createUsersWithArrayInputCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
* @param {Array.<User>} user List of user object
|
||||
* @param {module:api/UserApi~createUsersWithArrayInputCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
createUsersWithArrayInput(user, callback) {
|
||||
let postBody = user;
|
||||
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling createUsersWithArrayInput");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/createWithArray', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the createUsersWithListInput operation.
|
||||
* @callback module:api/UserApi~createUsersWithListInputCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
* @param {Array.<User>} user List of user object
|
||||
* @param {module:api/UserApi~createUsersWithListInputCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
createUsersWithListInput(user, callback) {
|
||||
let postBody = user;
|
||||
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling createUsersWithListInput");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/createWithList', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the deleteUser operation.
|
||||
* @callback module:api/UserApi~deleteUserCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {String} username The name that needs to be deleted
|
||||
* @param {module:api/UserApi~deleteUserCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
deleteUser(username, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username === undefined || username === null) {
|
||||
throw new Error("Missing the required parameter 'username' when calling deleteUser");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'username': username
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/{username}', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the getUserByName operation.
|
||||
* @callback module:api/UserApi~getUserByNameCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/User} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
* @param {String} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param {module:api/UserApi~getUserByNameCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/User}
|
||||
*/
|
||||
getUserByName(username, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username === undefined || username === null) {
|
||||
throw new Error("Missing the required parameter 'username' when calling getUserByName");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'username': username
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = User;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/{username}', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the loginUser operation.
|
||||
* @callback module:api/UserApi~loginUserCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {String} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
* @param {String} username The user name for login
|
||||
* @param {String} password The password for login in clear text
|
||||
* @param {module:api/UserApi~loginUserCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link String}
|
||||
*/
|
||||
loginUser(username, password, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username === undefined || username === null) {
|
||||
throw new Error("Missing the required parameter 'username' when calling loginUser");
|
||||
}
|
||||
|
||||
// verify the required parameter 'password' is set
|
||||
if (password === undefined || password === null) {
|
||||
throw new Error("Missing the required parameter 'password' when calling loginUser");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'username': username,
|
||||
'password': password
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = 'String';
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/login', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the logoutUser operation.
|
||||
* @callback module:api/UserApi~logoutUserCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
* @param {module:api/UserApi~logoutUserCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
logoutUser(callback) {
|
||||
let postBody = null;
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/logout', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the updateUser operation.
|
||||
* @callback module:api/UserApi~updateUserCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {String} username name that need to be deleted
|
||||
* @param {module:model/User} user Updated user object
|
||||
* @param {module:api/UserApi~updateUserCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
updateUser(username, user, callback) {
|
||||
let postBody = user;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username === undefined || username === null) {
|
||||
throw new Error("Missing the required parameter 'username' when calling updateUser");
|
||||
}
|
||||
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling updateUser");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'username': username
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/{username}', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
398
samples/openapi3/client/petstore/javascript-es6/src/index.js
Normal file
398
samples/openapi3/client/petstore/javascript-es6/src/index.js
Normal file
@@ -0,0 +1,398 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from './ApiClient';
|
||||
import AdditionalPropertiesClass from './model/AdditionalPropertiesClass';
|
||||
import Animal from './model/Animal';
|
||||
import ApiResponse from './model/ApiResponse';
|
||||
import ArrayOfArrayOfNumberOnly from './model/ArrayOfArrayOfNumberOnly';
|
||||
import ArrayOfNumberOnly from './model/ArrayOfNumberOnly';
|
||||
import ArrayTest from './model/ArrayTest';
|
||||
import Capitalization from './model/Capitalization';
|
||||
import Cat from './model/Cat';
|
||||
import Category from './model/Category';
|
||||
import ClassModel from './model/ClassModel';
|
||||
import Client from './model/Client';
|
||||
import Dog from './model/Dog';
|
||||
import EnumArrays from './model/EnumArrays';
|
||||
import EnumClass from './model/EnumClass';
|
||||
import EnumTest from './model/EnumTest';
|
||||
import File from './model/File';
|
||||
import FileSchemaTestClass from './model/FileSchemaTestClass';
|
||||
import Foo from './model/Foo';
|
||||
import FormatTest from './model/FormatTest';
|
||||
import HasOnlyReadOnly from './model/HasOnlyReadOnly';
|
||||
import InlineObject from './model/InlineObject';
|
||||
import InlineObject1 from './model/InlineObject1';
|
||||
import InlineObject2 from './model/InlineObject2';
|
||||
import InlineObject3 from './model/InlineObject3';
|
||||
import InlineObject4 from './model/InlineObject4';
|
||||
import InlineObject5 from './model/InlineObject5';
|
||||
import InlineResponseDefault from './model/InlineResponseDefault';
|
||||
import List from './model/List';
|
||||
import MapTest from './model/MapTest';
|
||||
import MixedPropertiesAndAdditionalPropertiesClass from './model/MixedPropertiesAndAdditionalPropertiesClass';
|
||||
import Model200Response from './model/Model200Response';
|
||||
import ModelReturn from './model/ModelReturn';
|
||||
import Name from './model/Name';
|
||||
import NumberOnly from './model/NumberOnly';
|
||||
import Order from './model/Order';
|
||||
import OuterComposite from './model/OuterComposite';
|
||||
import OuterEnum from './model/OuterEnum';
|
||||
import Pet from './model/Pet';
|
||||
import ReadOnlyFirst from './model/ReadOnlyFirst';
|
||||
import SpecialModelName from './model/SpecialModelName';
|
||||
import Tag from './model/Tag';
|
||||
import User from './model/User';
|
||||
import AnotherFakeApi from './api/AnotherFakeApi';
|
||||
import DefaultApi from './api/DefaultApi';
|
||||
import FakeApi from './api/FakeApi';
|
||||
import FakeClassnameTags123Api from './api/FakeClassnameTags123Api';
|
||||
import PetApi from './api/PetApi';
|
||||
import StoreApi from './api/StoreApi';
|
||||
import UserApi from './api/UserApi';
|
||||
|
||||
|
||||
/**
|
||||
* This_spec_is_mainly_for_testing_Petstore_server_and_contains_fake_endpoints_models__Please_do_not_use_this_for_any_other_purpose__Special_characters__.<br>
|
||||
* The <code>index</code> module provides access to constructors for all the classes which comprise the public API.
|
||||
* <p>
|
||||
* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
|
||||
* <pre>
|
||||
* var OpenApiPetstore = require('index'); // See note below*.
|
||||
* var xxxSvc = new OpenApiPetstore.XxxApi(); // Allocate the API class we're going to use.
|
||||
* var yyyModel = new OpenApiPetstore.Yyy(); // Construct a model instance.
|
||||
* yyyModel.someProperty = 'someValue';
|
||||
* ...
|
||||
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
|
||||
* ...
|
||||
* </pre>
|
||||
* <em>*NOTE: For a top-level AMD script, use require(['index'], function(){...})
|
||||
* and put the application logic within the callback function.</em>
|
||||
* </p>
|
||||
* <p>
|
||||
* A non-AMD browser application (discouraged) might do something like this:
|
||||
* <pre>
|
||||
* var xxxSvc = new OpenApiPetstore.XxxApi(); // Allocate the API class we're going to use.
|
||||
* var yyy = new OpenApiPetstore.Yyy(); // Construct a model instance.
|
||||
* yyyModel.someProperty = 'someValue';
|
||||
* ...
|
||||
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
|
||||
* ...
|
||||
* </pre>
|
||||
* </p>
|
||||
* @module index
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export {
|
||||
/**
|
||||
* The ApiClient constructor.
|
||||
* @property {module:ApiClient}
|
||||
*/
|
||||
ApiClient,
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesClass model constructor.
|
||||
* @property {module:model/AdditionalPropertiesClass}
|
||||
*/
|
||||
AdditionalPropertiesClass,
|
||||
|
||||
/**
|
||||
* The Animal model constructor.
|
||||
* @property {module:model/Animal}
|
||||
*/
|
||||
Animal,
|
||||
|
||||
/**
|
||||
* The ApiResponse model constructor.
|
||||
* @property {module:model/ApiResponse}
|
||||
*/
|
||||
ApiResponse,
|
||||
|
||||
/**
|
||||
* The ArrayOfArrayOfNumberOnly model constructor.
|
||||
* @property {module:model/ArrayOfArrayOfNumberOnly}
|
||||
*/
|
||||
ArrayOfArrayOfNumberOnly,
|
||||
|
||||
/**
|
||||
* The ArrayOfNumberOnly model constructor.
|
||||
* @property {module:model/ArrayOfNumberOnly}
|
||||
*/
|
||||
ArrayOfNumberOnly,
|
||||
|
||||
/**
|
||||
* The ArrayTest model constructor.
|
||||
* @property {module:model/ArrayTest}
|
||||
*/
|
||||
ArrayTest,
|
||||
|
||||
/**
|
||||
* The Capitalization model constructor.
|
||||
* @property {module:model/Capitalization}
|
||||
*/
|
||||
Capitalization,
|
||||
|
||||
/**
|
||||
* The Cat model constructor.
|
||||
* @property {module:model/Cat}
|
||||
*/
|
||||
Cat,
|
||||
|
||||
/**
|
||||
* The Category model constructor.
|
||||
* @property {module:model/Category}
|
||||
*/
|
||||
Category,
|
||||
|
||||
/**
|
||||
* The ClassModel model constructor.
|
||||
* @property {module:model/ClassModel}
|
||||
*/
|
||||
ClassModel,
|
||||
|
||||
/**
|
||||
* The Client model constructor.
|
||||
* @property {module:model/Client}
|
||||
*/
|
||||
Client,
|
||||
|
||||
/**
|
||||
* The Dog model constructor.
|
||||
* @property {module:model/Dog}
|
||||
*/
|
||||
Dog,
|
||||
|
||||
/**
|
||||
* The EnumArrays model constructor.
|
||||
* @property {module:model/EnumArrays}
|
||||
*/
|
||||
EnumArrays,
|
||||
|
||||
/**
|
||||
* The EnumClass model constructor.
|
||||
* @property {module:model/EnumClass}
|
||||
*/
|
||||
EnumClass,
|
||||
|
||||
/**
|
||||
* The EnumTest model constructor.
|
||||
* @property {module:model/EnumTest}
|
||||
*/
|
||||
EnumTest,
|
||||
|
||||
/**
|
||||
* The File model constructor.
|
||||
* @property {module:model/File}
|
||||
*/
|
||||
File,
|
||||
|
||||
/**
|
||||
* The FileSchemaTestClass model constructor.
|
||||
* @property {module:model/FileSchemaTestClass}
|
||||
*/
|
||||
FileSchemaTestClass,
|
||||
|
||||
/**
|
||||
* The Foo model constructor.
|
||||
* @property {module:model/Foo}
|
||||
*/
|
||||
Foo,
|
||||
|
||||
/**
|
||||
* The FormatTest model constructor.
|
||||
* @property {module:model/FormatTest}
|
||||
*/
|
||||
FormatTest,
|
||||
|
||||
/**
|
||||
* The HasOnlyReadOnly model constructor.
|
||||
* @property {module:model/HasOnlyReadOnly}
|
||||
*/
|
||||
HasOnlyReadOnly,
|
||||
|
||||
/**
|
||||
* The InlineObject model constructor.
|
||||
* @property {module:model/InlineObject}
|
||||
*/
|
||||
InlineObject,
|
||||
|
||||
/**
|
||||
* The InlineObject1 model constructor.
|
||||
* @property {module:model/InlineObject1}
|
||||
*/
|
||||
InlineObject1,
|
||||
|
||||
/**
|
||||
* The InlineObject2 model constructor.
|
||||
* @property {module:model/InlineObject2}
|
||||
*/
|
||||
InlineObject2,
|
||||
|
||||
/**
|
||||
* The InlineObject3 model constructor.
|
||||
* @property {module:model/InlineObject3}
|
||||
*/
|
||||
InlineObject3,
|
||||
|
||||
/**
|
||||
* The InlineObject4 model constructor.
|
||||
* @property {module:model/InlineObject4}
|
||||
*/
|
||||
InlineObject4,
|
||||
|
||||
/**
|
||||
* The InlineObject5 model constructor.
|
||||
* @property {module:model/InlineObject5}
|
||||
*/
|
||||
InlineObject5,
|
||||
|
||||
/**
|
||||
* The InlineResponseDefault model constructor.
|
||||
* @property {module:model/InlineResponseDefault}
|
||||
*/
|
||||
InlineResponseDefault,
|
||||
|
||||
/**
|
||||
* The List model constructor.
|
||||
* @property {module:model/List}
|
||||
*/
|
||||
List,
|
||||
|
||||
/**
|
||||
* The MapTest model constructor.
|
||||
* @property {module:model/MapTest}
|
||||
*/
|
||||
MapTest,
|
||||
|
||||
/**
|
||||
* The MixedPropertiesAndAdditionalPropertiesClass model constructor.
|
||||
* @property {module:model/MixedPropertiesAndAdditionalPropertiesClass}
|
||||
*/
|
||||
MixedPropertiesAndAdditionalPropertiesClass,
|
||||
|
||||
/**
|
||||
* The Model200Response model constructor.
|
||||
* @property {module:model/Model200Response}
|
||||
*/
|
||||
Model200Response,
|
||||
|
||||
/**
|
||||
* The ModelReturn model constructor.
|
||||
* @property {module:model/ModelReturn}
|
||||
*/
|
||||
ModelReturn,
|
||||
|
||||
/**
|
||||
* The Name model constructor.
|
||||
* @property {module:model/Name}
|
||||
*/
|
||||
Name,
|
||||
|
||||
/**
|
||||
* The NumberOnly model constructor.
|
||||
* @property {module:model/NumberOnly}
|
||||
*/
|
||||
NumberOnly,
|
||||
|
||||
/**
|
||||
* The Order model constructor.
|
||||
* @property {module:model/Order}
|
||||
*/
|
||||
Order,
|
||||
|
||||
/**
|
||||
* The OuterComposite model constructor.
|
||||
* @property {module:model/OuterComposite}
|
||||
*/
|
||||
OuterComposite,
|
||||
|
||||
/**
|
||||
* The OuterEnum model constructor.
|
||||
* @property {module:model/OuterEnum}
|
||||
*/
|
||||
OuterEnum,
|
||||
|
||||
/**
|
||||
* The Pet model constructor.
|
||||
* @property {module:model/Pet}
|
||||
*/
|
||||
Pet,
|
||||
|
||||
/**
|
||||
* The ReadOnlyFirst model constructor.
|
||||
* @property {module:model/ReadOnlyFirst}
|
||||
*/
|
||||
ReadOnlyFirst,
|
||||
|
||||
/**
|
||||
* The SpecialModelName model constructor.
|
||||
* @property {module:model/SpecialModelName}
|
||||
*/
|
||||
SpecialModelName,
|
||||
|
||||
/**
|
||||
* The Tag model constructor.
|
||||
* @property {module:model/Tag}
|
||||
*/
|
||||
Tag,
|
||||
|
||||
/**
|
||||
* The User model constructor.
|
||||
* @property {module:model/User}
|
||||
*/
|
||||
User,
|
||||
|
||||
/**
|
||||
* The AnotherFakeApi service constructor.
|
||||
* @property {module:api/AnotherFakeApi}
|
||||
*/
|
||||
AnotherFakeApi,
|
||||
|
||||
/**
|
||||
* The DefaultApi service constructor.
|
||||
* @property {module:api/DefaultApi}
|
||||
*/
|
||||
DefaultApi,
|
||||
|
||||
/**
|
||||
* The FakeApi service constructor.
|
||||
* @property {module:api/FakeApi}
|
||||
*/
|
||||
FakeApi,
|
||||
|
||||
/**
|
||||
* The FakeClassnameTags123Api service constructor.
|
||||
* @property {module:api/FakeClassnameTags123Api}
|
||||
*/
|
||||
FakeClassnameTags123Api,
|
||||
|
||||
/**
|
||||
* The PetApi service constructor.
|
||||
* @property {module:api/PetApi}
|
||||
*/
|
||||
PetApi,
|
||||
|
||||
/**
|
||||
* The StoreApi service constructor.
|
||||
* @property {module:api/StoreApi}
|
||||
*/
|
||||
StoreApi,
|
||||
|
||||
/**
|
||||
* The UserApi service constructor.
|
||||
* @property {module:api/UserApi}
|
||||
*/
|
||||
UserApi
|
||||
};
|
||||
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesClass model module.
|
||||
* @module model/AdditionalPropertiesClass
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class AdditionalPropertiesClass {
|
||||
/**
|
||||
* Constructs a new <code>AdditionalPropertiesClass</code>.
|
||||
* @alias module:model/AdditionalPropertiesClass
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
AdditionalPropertiesClass.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>AdditionalPropertiesClass</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/AdditionalPropertiesClass} obj Optional instance to populate.
|
||||
* @return {module:model/AdditionalPropertiesClass} The populated <code>AdditionalPropertiesClass</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AdditionalPropertiesClass();
|
||||
|
||||
if (data.hasOwnProperty('map_property')) {
|
||||
obj['map_property'] = ApiClient.convertToType(data['map_property'], {'String': 'String'});
|
||||
}
|
||||
if (data.hasOwnProperty('map_of_map_property')) {
|
||||
obj['map_of_map_property'] = ApiClient.convertToType(data['map_of_map_property'], {'String': {'String': 'String'}});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Object.<String, String>} map_property
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['map_property'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Object.<String, String>>} map_of_map_property
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['map_of_map_property'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default AdditionalPropertiesClass;
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The Animal model module.
|
||||
* @module model/Animal
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Animal {
|
||||
/**
|
||||
* Constructs a new <code>Animal</code>.
|
||||
* @alias module:model/Animal
|
||||
* @param className {String}
|
||||
*/
|
||||
constructor(className) {
|
||||
|
||||
Animal.initialize(this, className);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj, className) {
|
||||
obj['className'] = className;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>Animal</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/Animal} obj Optional instance to populate.
|
||||
* @return {module:model/Animal} The populated <code>Animal</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new Animal();
|
||||
|
||||
if (data.hasOwnProperty('className')) {
|
||||
obj['className'] = ApiClient.convertToType(data['className'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('color')) {
|
||||
obj['color'] = ApiClient.convertToType(data['color'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} className
|
||||
*/
|
||||
Animal.prototype['className'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} color
|
||||
* @default 'red'
|
||||
*/
|
||||
Animal.prototype['color'] = 'red';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default Animal;
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import Animal from './Animal';
|
||||
|
||||
/**
|
||||
* The AnimalFarm model module.
|
||||
* @module model/AnimalFarm
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class AnimalFarm extends Array {
|
||||
/**
|
||||
* Constructs a new <code>AnimalFarm</code>.
|
||||
* @alias module:model/AnimalFarm
|
||||
* @extends Array
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
|
||||
AnimalFarm.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>AnimalFarm</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/AnimalFarm} obj Optional instance to populate.
|
||||
* @return {module:model/AnimalFarm} The populated <code>AnimalFarm</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AnimalFarm();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'Animal');
|
||||
|
||||
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default AnimalFarm;
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The ApiResponse model module.
|
||||
* @module model/ApiResponse
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class ApiResponse {
|
||||
/**
|
||||
* Constructs a new <code>ApiResponse</code>.
|
||||
* @alias module:model/ApiResponse
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
ApiResponse.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ApiResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/ApiResponse} obj Optional instance to populate.
|
||||
* @return {module:model/ApiResponse} The populated <code>ApiResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ApiResponse();
|
||||
|
||||
if (data.hasOwnProperty('code')) {
|
||||
obj['code'] = ApiClient.convertToType(data['code'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('type')) {
|
||||
obj['type'] = ApiClient.convertToType(data['type'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('message')) {
|
||||
obj['message'] = ApiClient.convertToType(data['message'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Number} code
|
||||
*/
|
||||
ApiResponse.prototype['code'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} type
|
||||
*/
|
||||
ApiResponse.prototype['type'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} message
|
||||
*/
|
||||
ApiResponse.prototype['message'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default ApiResponse;
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The ArrayOfArrayOfNumberOnly model module.
|
||||
* @module model/ArrayOfArrayOfNumberOnly
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class ArrayOfArrayOfNumberOnly {
|
||||
/**
|
||||
* Constructs a new <code>ArrayOfArrayOfNumberOnly</code>.
|
||||
* @alias module:model/ArrayOfArrayOfNumberOnly
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
ArrayOfArrayOfNumberOnly.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ArrayOfArrayOfNumberOnly</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/ArrayOfArrayOfNumberOnly} obj Optional instance to populate.
|
||||
* @return {module:model/ArrayOfArrayOfNumberOnly} The populated <code>ArrayOfArrayOfNumberOnly</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ArrayOfArrayOfNumberOnly();
|
||||
|
||||
if (data.hasOwnProperty('ArrayArrayNumber')) {
|
||||
obj['ArrayArrayNumber'] = ApiClient.convertToType(data['ArrayArrayNumber'], [['Number']]);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Array.<Array.<Number>>} ArrayArrayNumber
|
||||
*/
|
||||
ArrayOfArrayOfNumberOnly.prototype['ArrayArrayNumber'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default ArrayOfArrayOfNumberOnly;
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The ArrayOfNumberOnly model module.
|
||||
* @module model/ArrayOfNumberOnly
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class ArrayOfNumberOnly {
|
||||
/**
|
||||
* Constructs a new <code>ArrayOfNumberOnly</code>.
|
||||
* @alias module:model/ArrayOfNumberOnly
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
ArrayOfNumberOnly.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ArrayOfNumberOnly</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/ArrayOfNumberOnly} obj Optional instance to populate.
|
||||
* @return {module:model/ArrayOfNumberOnly} The populated <code>ArrayOfNumberOnly</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ArrayOfNumberOnly();
|
||||
|
||||
if (data.hasOwnProperty('ArrayNumber')) {
|
||||
obj['ArrayNumber'] = ApiClient.convertToType(data['ArrayNumber'], ['Number']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Array.<Number>} ArrayNumber
|
||||
*/
|
||||
ArrayOfNumberOnly.prototype['ArrayNumber'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default ArrayOfNumberOnly;
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import ReadOnlyFirst from './ReadOnlyFirst';
|
||||
|
||||
/**
|
||||
* The ArrayTest model module.
|
||||
* @module model/ArrayTest
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class ArrayTest {
|
||||
/**
|
||||
* Constructs a new <code>ArrayTest</code>.
|
||||
* @alias module:model/ArrayTest
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
ArrayTest.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ArrayTest</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/ArrayTest} obj Optional instance to populate.
|
||||
* @return {module:model/ArrayTest} The populated <code>ArrayTest</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ArrayTest();
|
||||
|
||||
if (data.hasOwnProperty('array_of_string')) {
|
||||
obj['array_of_string'] = ApiClient.convertToType(data['array_of_string'], ['String']);
|
||||
}
|
||||
if (data.hasOwnProperty('array_array_of_integer')) {
|
||||
obj['array_array_of_integer'] = ApiClient.convertToType(data['array_array_of_integer'], [['Number']]);
|
||||
}
|
||||
if (data.hasOwnProperty('array_array_of_model')) {
|
||||
obj['array_array_of_model'] = ApiClient.convertToType(data['array_array_of_model'], [[ReadOnlyFirst]]);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Array.<String>} array_of_string
|
||||
*/
|
||||
ArrayTest.prototype['array_of_string'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<Array.<Number>>} array_array_of_integer
|
||||
*/
|
||||
ArrayTest.prototype['array_array_of_integer'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<Array.<module:model/ReadOnlyFirst>>} array_array_of_model
|
||||
*/
|
||||
ArrayTest.prototype['array_array_of_model'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default ArrayTest;
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The Capitalization model module.
|
||||
* @module model/Capitalization
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Capitalization {
|
||||
/**
|
||||
* Constructs a new <code>Capitalization</code>.
|
||||
* @alias module:model/Capitalization
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
Capitalization.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>Capitalization</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/Capitalization} obj Optional instance to populate.
|
||||
* @return {module:model/Capitalization} The populated <code>Capitalization</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new Capitalization();
|
||||
|
||||
if (data.hasOwnProperty('smallCamel')) {
|
||||
obj['smallCamel'] = ApiClient.convertToType(data['smallCamel'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('CapitalCamel')) {
|
||||
obj['CapitalCamel'] = ApiClient.convertToType(data['CapitalCamel'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('small_Snake')) {
|
||||
obj['small_Snake'] = ApiClient.convertToType(data['small_Snake'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('Capital_Snake')) {
|
||||
obj['Capital_Snake'] = ApiClient.convertToType(data['Capital_Snake'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('SCA_ETH_Flow_Points')) {
|
||||
obj['SCA_ETH_Flow_Points'] = ApiClient.convertToType(data['SCA_ETH_Flow_Points'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('ATT_NAME')) {
|
||||
obj['ATT_NAME'] = ApiClient.convertToType(data['ATT_NAME'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} smallCamel
|
||||
*/
|
||||
Capitalization.prototype['smallCamel'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} CapitalCamel
|
||||
*/
|
||||
Capitalization.prototype['CapitalCamel'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} small_Snake
|
||||
*/
|
||||
Capitalization.prototype['small_Snake'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} Capital_Snake
|
||||
*/
|
||||
Capitalization.prototype['Capital_Snake'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} SCA_ETH_Flow_Points
|
||||
*/
|
||||
Capitalization.prototype['SCA_ETH_Flow_Points'] = undefined;
|
||||
|
||||
/**
|
||||
* Name of the pet
|
||||
* @member {String} ATT_NAME
|
||||
*/
|
||||
Capitalization.prototype['ATT_NAME'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default Capitalization;
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import Animal from './Animal';
|
||||
|
||||
/**
|
||||
* The Cat model module.
|
||||
* @module model/Cat
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Cat {
|
||||
/**
|
||||
* Constructs a new <code>Cat</code>.
|
||||
* @alias module:model/Cat
|
||||
* @extends module:model/Animal
|
||||
* @implements module:model/Animal
|
||||
* @param className {String}
|
||||
*/
|
||||
constructor(className) {
|
||||
Animal.initialize(this, className);
|
||||
Cat.initialize(this, className);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj, className) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>Cat</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/Cat} obj Optional instance to populate.
|
||||
* @return {module:model/Cat} The populated <code>Cat</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new Cat();
|
||||
Animal.constructFromObject(data, obj);
|
||||
Animal.constructFromObject(data, obj);
|
||||
|
||||
if (data.hasOwnProperty('declawed')) {
|
||||
obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Boolean} declawed
|
||||
*/
|
||||
Cat.prototype['declawed'] = undefined;
|
||||
|
||||
|
||||
// Implement Animal interface:
|
||||
/**
|
||||
* @member {String} className
|
||||
*/
|
||||
Animal.prototype['className'] = undefined;
|
||||
/**
|
||||
* @member {String} color
|
||||
* @default 'red'
|
||||
*/
|
||||
Animal.prototype['color'] = 'red';
|
||||
|
||||
|
||||
|
||||
|
||||
export default Cat;
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The Category model module.
|
||||
* @module model/Category
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Category {
|
||||
/**
|
||||
* Constructs a new <code>Category</code>.
|
||||
* @alias module:model/Category
|
||||
* @param name {String}
|
||||
*/
|
||||
constructor(name) {
|
||||
|
||||
Category.initialize(this, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj, name) {
|
||||
obj['name'] = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>Category</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/Category} obj Optional instance to populate.
|
||||
* @return {module:model/Category} The populated <code>Category</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new Category();
|
||||
|
||||
if (data.hasOwnProperty('id')) {
|
||||
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('name')) {
|
||||
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Number} id
|
||||
*/
|
||||
Category.prototype['id'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} name
|
||||
* @default 'default-name'
|
||||
*/
|
||||
Category.prototype['name'] = 'default-name';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default Category;
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The ClassModel model module.
|
||||
* @module model/ClassModel
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class ClassModel {
|
||||
/**
|
||||
* Constructs a new <code>ClassModel</code>.
|
||||
* Model for testing model with \"_class\" property
|
||||
* @alias module:model/ClassModel
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
ClassModel.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ClassModel</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/ClassModel} obj Optional instance to populate.
|
||||
* @return {module:model/ClassModel} The populated <code>ClassModel</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ClassModel();
|
||||
|
||||
if (data.hasOwnProperty('_class')) {
|
||||
obj['_class'] = ApiClient.convertToType(data['_class'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} _class
|
||||
*/
|
||||
ClassModel.prototype['_class'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default ClassModel;
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The Client model module.
|
||||
* @module model/Client
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Client {
|
||||
/**
|
||||
* Constructs a new <code>Client</code>.
|
||||
* @alias module:model/Client
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
Client.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>Client</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/Client} obj Optional instance to populate.
|
||||
* @return {module:model/Client} The populated <code>Client</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new Client();
|
||||
|
||||
if (data.hasOwnProperty('client')) {
|
||||
obj['client'] = ApiClient.convertToType(data['client'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} client
|
||||
*/
|
||||
Client.prototype['client'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default Client;
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import Animal from './Animal';
|
||||
|
||||
/**
|
||||
* The Dog model module.
|
||||
* @module model/Dog
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Dog {
|
||||
/**
|
||||
* Constructs a new <code>Dog</code>.
|
||||
* @alias module:model/Dog
|
||||
* @extends module:model/Animal
|
||||
* @implements module:model/Animal
|
||||
* @param className {String}
|
||||
*/
|
||||
constructor(className) {
|
||||
Animal.initialize(this, className);
|
||||
Dog.initialize(this, className);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj, className) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>Dog</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/Dog} obj Optional instance to populate.
|
||||
* @return {module:model/Dog} The populated <code>Dog</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new Dog();
|
||||
Animal.constructFromObject(data, obj);
|
||||
Animal.constructFromObject(data, obj);
|
||||
|
||||
if (data.hasOwnProperty('breed')) {
|
||||
obj['breed'] = ApiClient.convertToType(data['breed'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} breed
|
||||
*/
|
||||
Dog.prototype['breed'] = undefined;
|
||||
|
||||
|
||||
// Implement Animal interface:
|
||||
/**
|
||||
* @member {String} className
|
||||
*/
|
||||
Animal.prototype['className'] = undefined;
|
||||
/**
|
||||
* @member {String} color
|
||||
* @default 'red'
|
||||
*/
|
||||
Animal.prototype['color'] = 'red';
|
||||
|
||||
|
||||
|
||||
|
||||
export default Dog;
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The EnumArrays model module.
|
||||
* @module model/EnumArrays
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class EnumArrays {
|
||||
/**
|
||||
* Constructs a new <code>EnumArrays</code>.
|
||||
* @alias module:model/EnumArrays
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
EnumArrays.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>EnumArrays</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/EnumArrays} obj Optional instance to populate.
|
||||
* @return {module:model/EnumArrays} The populated <code>EnumArrays</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new EnumArrays();
|
||||
|
||||
if (data.hasOwnProperty('just_symbol')) {
|
||||
obj['just_symbol'] = ApiClient.convertToType(data['just_symbol'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('array_enum')) {
|
||||
obj['array_enum'] = ApiClient.convertToType(data['array_enum'], ['String']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {module:model/EnumArrays.JustSymbolEnum} just_symbol
|
||||
*/
|
||||
EnumArrays.prototype['just_symbol'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<module:model/EnumArrays.ArrayEnumEnum>} array_enum
|
||||
*/
|
||||
EnumArrays.prototype['array_enum'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Allowed values for the <code>just_symbol</code> property.
|
||||
* @enum {String}
|
||||
* @readonly
|
||||
*/
|
||||
EnumArrays['JustSymbolEnum'] = {
|
||||
|
||||
/**
|
||||
* value: ">="
|
||||
* @const
|
||||
*/
|
||||
"GREATER_THAN_OR_EQUAL_TO": ">=",
|
||||
|
||||
/**
|
||||
* value: "$"
|
||||
* @const
|
||||
*/
|
||||
"DOLLAR": "$"
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Allowed values for the <code>arrayEnum</code> property.
|
||||
* @enum {String}
|
||||
* @readonly
|
||||
*/
|
||||
EnumArrays['ArrayEnumEnum'] = {
|
||||
|
||||
/**
|
||||
* value: "fish"
|
||||
* @const
|
||||
*/
|
||||
"fish": "fish",
|
||||
|
||||
/**
|
||||
* value: "crab"
|
||||
* @const
|
||||
*/
|
||||
"crab": "crab"
|
||||
};
|
||||
|
||||
|
||||
|
||||
export default EnumArrays;
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
/**
|
||||
* Enum class EnumClass.
|
||||
* @enum {}
|
||||
* @readonly
|
||||
*/
|
||||
export default class EnumClass {
|
||||
|
||||
/**
|
||||
* value: "_abc"
|
||||
* @const
|
||||
*/
|
||||
"_abc" = "_abc";
|
||||
|
||||
|
||||
/**
|
||||
* value: "-efg"
|
||||
* @const
|
||||
*/
|
||||
"-efg" = "-efg";
|
||||
|
||||
|
||||
/**
|
||||
* value: "(xyz)"
|
||||
* @const
|
||||
*/
|
||||
"(xyz)" = "(xyz)";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns a <code>EnumClass</code> enum value from a Javascript object name.
|
||||
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
||||
* @return {module:model/EnumClass} The enum <code>EnumClass</code> value.
|
||||
*/
|
||||
static constructFromObject(object) {
|
||||
return object;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import OuterEnum from './OuterEnum';
|
||||
|
||||
/**
|
||||
* The EnumTest model module.
|
||||
* @module model/EnumTest
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class EnumTest {
|
||||
/**
|
||||
* Constructs a new <code>EnumTest</code>.
|
||||
* @alias module:model/EnumTest
|
||||
* @param enumStringRequired {module:model/EnumTest.EnumStringRequiredEnum}
|
||||
*/
|
||||
constructor(enumStringRequired) {
|
||||
|
||||
EnumTest.initialize(this, enumStringRequired);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj, enumStringRequired) {
|
||||
obj['enum_string_required'] = enumStringRequired;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>EnumTest</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/EnumTest} obj Optional instance to populate.
|
||||
* @return {module:model/EnumTest} The populated <code>EnumTest</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new EnumTest();
|
||||
|
||||
if (data.hasOwnProperty('enum_string')) {
|
||||
obj['enum_string'] = ApiClient.convertToType(data['enum_string'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('enum_string_required')) {
|
||||
obj['enum_string_required'] = ApiClient.convertToType(data['enum_string_required'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('enum_integer')) {
|
||||
obj['enum_integer'] = ApiClient.convertToType(data['enum_integer'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('enum_number')) {
|
||||
obj['enum_number'] = ApiClient.convertToType(data['enum_number'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('outerEnum')) {
|
||||
obj['outerEnum'] = OuterEnum.constructFromObject(data['outerEnum']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {module:model/EnumTest.EnumStringEnum} enum_string
|
||||
*/
|
||||
EnumTest.prototype['enum_string'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {module:model/EnumTest.EnumStringRequiredEnum} enum_string_required
|
||||
*/
|
||||
EnumTest.prototype['enum_string_required'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {module:model/EnumTest.EnumIntegerEnum} enum_integer
|
||||
*/
|
||||
EnumTest.prototype['enum_integer'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {module:model/EnumTest.EnumNumberEnum} enum_number
|
||||
*/
|
||||
EnumTest.prototype['enum_number'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {module:model/OuterEnum} outerEnum
|
||||
*/
|
||||
EnumTest.prototype['outerEnum'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Allowed values for the <code>enum_string</code> property.
|
||||
* @enum {String}
|
||||
* @readonly
|
||||
*/
|
||||
EnumTest['EnumStringEnum'] = {
|
||||
|
||||
/**
|
||||
* value: "UPPER"
|
||||
* @const
|
||||
*/
|
||||
"UPPER": "UPPER",
|
||||
|
||||
/**
|
||||
* value: "lower"
|
||||
* @const
|
||||
*/
|
||||
"lower": "lower",
|
||||
|
||||
/**
|
||||
* value: ""
|
||||
* @const
|
||||
*/
|
||||
"empty": ""
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Allowed values for the <code>enum_string_required</code> property.
|
||||
* @enum {String}
|
||||
* @readonly
|
||||
*/
|
||||
EnumTest['EnumStringRequiredEnum'] = {
|
||||
|
||||
/**
|
||||
* value: "UPPER"
|
||||
* @const
|
||||
*/
|
||||
"UPPER": "UPPER",
|
||||
|
||||
/**
|
||||
* value: "lower"
|
||||
* @const
|
||||
*/
|
||||
"lower": "lower",
|
||||
|
||||
/**
|
||||
* value: ""
|
||||
* @const
|
||||
*/
|
||||
"empty": ""
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Allowed values for the <code>enum_integer</code> property.
|
||||
* @enum {Number}
|
||||
* @readonly
|
||||
*/
|
||||
EnumTest['EnumIntegerEnum'] = {
|
||||
|
||||
/**
|
||||
* value: 1
|
||||
* @const
|
||||
*/
|
||||
"1": 1,
|
||||
|
||||
/**
|
||||
* value: -1
|
||||
* @const
|
||||
*/
|
||||
"-1": -1
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Allowed values for the <code>enum_number</code> property.
|
||||
* @enum {Number}
|
||||
* @readonly
|
||||
*/
|
||||
EnumTest['EnumNumberEnum'] = {
|
||||
|
||||
/**
|
||||
* value: 1.1
|
||||
* @const
|
||||
*/
|
||||
"1.1": 1.1,
|
||||
|
||||
/**
|
||||
* value: -1.2
|
||||
* @const
|
||||
*/
|
||||
"-1.2": -1.2
|
||||
};
|
||||
|
||||
|
||||
|
||||
export default EnumTest;
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The File model module.
|
||||
* @module model/File
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class File {
|
||||
/**
|
||||
* Constructs a new <code>File</code>.
|
||||
* Must be named `File` for test.
|
||||
* @alias module:model/File
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
File.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>File</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/File} obj Optional instance to populate.
|
||||
* @return {module:model/File} The populated <code>File</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new File();
|
||||
|
||||
if (data.hasOwnProperty('sourceURI')) {
|
||||
obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test capitalization
|
||||
* @member {String} sourceURI
|
||||
*/
|
||||
File.prototype['sourceURI'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default File;
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The FileSchemaTestClass model module.
|
||||
* @module model/FileSchemaTestClass
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class FileSchemaTestClass {
|
||||
/**
|
||||
* Constructs a new <code>FileSchemaTestClass</code>.
|
||||
* @alias module:model/FileSchemaTestClass
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
FileSchemaTestClass.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>FileSchemaTestClass</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
|
||||
* @return {module:model/FileSchemaTestClass} The populated <code>FileSchemaTestClass</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new FileSchemaTestClass();
|
||||
|
||||
if (data.hasOwnProperty('file')) {
|
||||
obj['file'] = File.constructFromObject(data['file']);
|
||||
}
|
||||
if (data.hasOwnProperty('files')) {
|
||||
obj['files'] = ApiClient.convertToType(data['files'], [File]);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {File} file
|
||||
*/
|
||||
FileSchemaTestClass.prototype['file'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<File>} files
|
||||
*/
|
||||
FileSchemaTestClass.prototype['files'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default FileSchemaTestClass;
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The Foo model module.
|
||||
* @module model/Foo
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Foo {
|
||||
/**
|
||||
* Constructs a new <code>Foo</code>.
|
||||
* @alias module:model/Foo
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
Foo.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>Foo</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/Foo} obj Optional instance to populate.
|
||||
* @return {module:model/Foo} The populated <code>Foo</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new Foo();
|
||||
|
||||
if (data.hasOwnProperty('bar')) {
|
||||
obj['bar'] = ApiClient.convertToType(data['bar'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} bar
|
||||
* @default 'bar'
|
||||
*/
|
||||
Foo.prototype['bar'] = 'bar';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default Foo;
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The FormatTest model module.
|
||||
* @module model/FormatTest
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class FormatTest {
|
||||
/**
|
||||
* Constructs a new <code>FormatTest</code>.
|
||||
* @alias module:model/FormatTest
|
||||
* @param _number {Number}
|
||||
* @param _byte {Blob}
|
||||
* @param _date {Date}
|
||||
* @param password {String}
|
||||
*/
|
||||
constructor(_number, _byte, _date, password) {
|
||||
|
||||
FormatTest.initialize(this, _number, _byte, _date, password);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj, _number, _byte, _date, password) {
|
||||
obj['number'] = _number;
|
||||
obj['byte'] = _byte;
|
||||
obj['date'] = _date;
|
||||
obj['password'] = password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>FormatTest</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/FormatTest} obj Optional instance to populate.
|
||||
* @return {module:model/FormatTest} The populated <code>FormatTest</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new FormatTest();
|
||||
|
||||
if (data.hasOwnProperty('integer')) {
|
||||
obj['integer'] = ApiClient.convertToType(data['integer'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('int32')) {
|
||||
obj['int32'] = ApiClient.convertToType(data['int32'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('int64')) {
|
||||
obj['int64'] = ApiClient.convertToType(data['int64'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('number')) {
|
||||
obj['number'] = ApiClient.convertToType(data['number'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('float')) {
|
||||
obj['float'] = ApiClient.convertToType(data['float'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('double')) {
|
||||
obj['double'] = ApiClient.convertToType(data['double'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('string')) {
|
||||
obj['string'] = ApiClient.convertToType(data['string'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('byte')) {
|
||||
obj['byte'] = ApiClient.convertToType(data['byte'], 'Blob');
|
||||
}
|
||||
if (data.hasOwnProperty('binary')) {
|
||||
obj['binary'] = ApiClient.convertToType(data['binary'], File);
|
||||
}
|
||||
if (data.hasOwnProperty('date')) {
|
||||
obj['date'] = ApiClient.convertToType(data['date'], 'Date');
|
||||
}
|
||||
if (data.hasOwnProperty('dateTime')) {
|
||||
obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'Date');
|
||||
}
|
||||
if (data.hasOwnProperty('uuid')) {
|
||||
obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('password')) {
|
||||
obj['password'] = ApiClient.convertToType(data['password'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('pattern_with_digits')) {
|
||||
obj['pattern_with_digits'] = ApiClient.convertToType(data['pattern_with_digits'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('pattern_with_digits_and_delimiter')) {
|
||||
obj['pattern_with_digits_and_delimiter'] = ApiClient.convertToType(data['pattern_with_digits_and_delimiter'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Number} integer
|
||||
*/
|
||||
FormatTest.prototype['integer'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} int32
|
||||
*/
|
||||
FormatTest.prototype['int32'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} int64
|
||||
*/
|
||||
FormatTest.prototype['int64'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} number
|
||||
*/
|
||||
FormatTest.prototype['number'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} float
|
||||
*/
|
||||
FormatTest.prototype['float'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} double
|
||||
*/
|
||||
FormatTest.prototype['double'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} string
|
||||
*/
|
||||
FormatTest.prototype['string'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Blob} byte
|
||||
*/
|
||||
FormatTest.prototype['byte'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {File} binary
|
||||
*/
|
||||
FormatTest.prototype['binary'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Date} date
|
||||
*/
|
||||
FormatTest.prototype['date'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Date} dateTime
|
||||
*/
|
||||
FormatTest.prototype['dateTime'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} uuid
|
||||
*/
|
||||
FormatTest.prototype['uuid'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} password
|
||||
*/
|
||||
FormatTest.prototype['password'] = undefined;
|
||||
|
||||
/**
|
||||
* A string that is a 10 digit number. Can have leading zeros.
|
||||
* @member {String} pattern_with_digits
|
||||
*/
|
||||
FormatTest.prototype['pattern_with_digits'] = undefined;
|
||||
|
||||
/**
|
||||
* A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
|
||||
* @member {String} pattern_with_digits_and_delimiter
|
||||
*/
|
||||
FormatTest.prototype['pattern_with_digits_and_delimiter'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default FormatTest;
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The HasOnlyReadOnly model module.
|
||||
* @module model/HasOnlyReadOnly
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class HasOnlyReadOnly {
|
||||
/**
|
||||
* Constructs a new <code>HasOnlyReadOnly</code>.
|
||||
* @alias module:model/HasOnlyReadOnly
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
HasOnlyReadOnly.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>HasOnlyReadOnly</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/HasOnlyReadOnly} obj Optional instance to populate.
|
||||
* @return {module:model/HasOnlyReadOnly} The populated <code>HasOnlyReadOnly</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new HasOnlyReadOnly();
|
||||
|
||||
if (data.hasOwnProperty('bar')) {
|
||||
obj['bar'] = ApiClient.convertToType(data['bar'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('foo')) {
|
||||
obj['foo'] = ApiClient.convertToType(data['foo'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} bar
|
||||
*/
|
||||
HasOnlyReadOnly.prototype['bar'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} foo
|
||||
*/
|
||||
HasOnlyReadOnly.prototype['foo'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default HasOnlyReadOnly;
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The InlineObject model module.
|
||||
* @module model/InlineObject
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class InlineObject {
|
||||
/**
|
||||
* Constructs a new <code>InlineObject</code>.
|
||||
* @alias module:model/InlineObject
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
InlineObject.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>InlineObject</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/InlineObject} obj Optional instance to populate.
|
||||
* @return {module:model/InlineObject} The populated <code>InlineObject</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new InlineObject();
|
||||
|
||||
if (data.hasOwnProperty('name')) {
|
||||
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('status')) {
|
||||
obj['status'] = ApiClient.convertToType(data['status'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated name of the pet
|
||||
* @member {String} name
|
||||
*/
|
||||
InlineObject.prototype['name'] = undefined;
|
||||
|
||||
/**
|
||||
* Updated status of the pet
|
||||
* @member {String} status
|
||||
*/
|
||||
InlineObject.prototype['status'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default InlineObject;
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The InlineObject1 model module.
|
||||
* @module model/InlineObject1
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class InlineObject1 {
|
||||
/**
|
||||
* Constructs a new <code>InlineObject1</code>.
|
||||
* @alias module:model/InlineObject1
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
InlineObject1.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>InlineObject1</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/InlineObject1} obj Optional instance to populate.
|
||||
* @return {module:model/InlineObject1} The populated <code>InlineObject1</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new InlineObject1();
|
||||
|
||||
if (data.hasOwnProperty('additionalMetadata')) {
|
||||
obj['additionalMetadata'] = ApiClient.convertToType(data['additionalMetadata'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('file')) {
|
||||
obj['file'] = ApiClient.convertToType(data['file'], File);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional data to pass to server
|
||||
* @member {String} additionalMetadata
|
||||
*/
|
||||
InlineObject1.prototype['additionalMetadata'] = undefined;
|
||||
|
||||
/**
|
||||
* file to upload
|
||||
* @member {File} file
|
||||
*/
|
||||
InlineObject1.prototype['file'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default InlineObject1;
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The InlineObject2 model module.
|
||||
* @module model/InlineObject2
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class InlineObject2 {
|
||||
/**
|
||||
* Constructs a new <code>InlineObject2</code>.
|
||||
* @alias module:model/InlineObject2
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
InlineObject2.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>InlineObject2</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/InlineObject2} obj Optional instance to populate.
|
||||
* @return {module:model/InlineObject2} The populated <code>InlineObject2</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new InlineObject2();
|
||||
|
||||
if (data.hasOwnProperty('enum_form_string_array')) {
|
||||
obj['enum_form_string_array'] = ApiClient.convertToType(data['enum_form_string_array'], ['String']);
|
||||
}
|
||||
if (data.hasOwnProperty('enum_form_string')) {
|
||||
obj['enum_form_string'] = ApiClient.convertToType(data['enum_form_string'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Form parameter enum test (string array)
|
||||
* @member {Array.<module:model/InlineObject2.EnumFormStringArrayEnum>} enum_form_string_array
|
||||
*/
|
||||
InlineObject2.prototype['enum_form_string_array'] = undefined;
|
||||
|
||||
/**
|
||||
* Form parameter enum test (string)
|
||||
* @member {module:model/InlineObject2.EnumFormStringEnum} enum_form_string
|
||||
* @default '-efg'
|
||||
*/
|
||||
InlineObject2.prototype['enum_form_string'] = '-efg';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Allowed values for the <code>enumFormStringArray</code> property.
|
||||
* @enum {String}
|
||||
* @readonly
|
||||
*/
|
||||
InlineObject2['EnumFormStringArrayEnum'] = {
|
||||
|
||||
/**
|
||||
* value: ">"
|
||||
* @const
|
||||
*/
|
||||
"GREATER_THAN": ">",
|
||||
|
||||
/**
|
||||
* value: "$"
|
||||
* @const
|
||||
*/
|
||||
"DOLLAR": "$"
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Allowed values for the <code>enum_form_string</code> property.
|
||||
* @enum {String}
|
||||
* @readonly
|
||||
*/
|
||||
InlineObject2['EnumFormStringEnum'] = {
|
||||
|
||||
/**
|
||||
* value: "_abc"
|
||||
* @const
|
||||
*/
|
||||
"_abc": "_abc",
|
||||
|
||||
/**
|
||||
* value: "-efg"
|
||||
* @const
|
||||
*/
|
||||
"-efg": "-efg",
|
||||
|
||||
/**
|
||||
* value: "(xyz)"
|
||||
* @const
|
||||
*/
|
||||
"(xyz)": "(xyz)"
|
||||
};
|
||||
|
||||
|
||||
|
||||
export default InlineObject2;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user