forked from loafle/openapi-generator-original
Combine javascript and javascript-apollo generators (#13270)
* Combine javascript and javascript-apollo generator functionality * Combine javascript and javascript-apollo templates * update configs * deprecate javascript-apollo generator * bonus magic string deletion ✨ * update samples * update generator docs * fix: include .babelrc in apollo generation * update samples * update samples * rename javascript-apollo to javascript-apollo-deprecated * fix javascript apollo library template Apollo library now uses the partial_model_generic template file from the ES6 library, as it includes many fixes and improvements (including handling models with ill-named attributes) * update samples * Create javascript-apollo-deprecated.md * Updated javascript generator template's gitignore Updates .gitignore with that from https://github.com/github/gitignore/blob/main/Node.gitignore Main reason for the update is to ignore the 'dist' folder with compiled files by default. * javascript generator: merge api_test template files The only difference is that Apollo is not designed for browser, so having a "if(browser)" check is useless, but doesn't hurt. * update docs * cleanup * avoid possible config clash * update javascript-apollo sample * update javascript-es6 sample I kept the pom.xml from before * update javascript-promise-es6 sample kept pom.xml * update samples
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
# OpenApiPetstore.AdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapProperty** | **{String: String}** | | [optional]
|
||||
**mapOfMapProperty** | **{String: {String: String}}** | | [optional]
|
||||
|
||||
|
||||
10
samples/client/petstore/javascript-apollo/docs/Animal.md
Normal file
10
samples/client/petstore/javascript-apollo/docs/Animal.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# OpenApiPetstore.Animal
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional] [default to 'red']
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
## 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,9 @@
|
||||
# OpenApiPetstore.ArrayOfArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayArrayNumber** | **[[Number]]** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.ArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayNumber** | **[Number]** | | [optional]
|
||||
|
||||
|
||||
11
samples/client/petstore/javascript-apollo/docs/ArrayTest.md
Normal file
11
samples/client/petstore/javascript-apollo/docs/ArrayTest.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# OpenApiPetstore.ArrayTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayOfString** | **[String]** | | [optional]
|
||||
**arrayArrayOfInteger** | **[[Number]]** | | [optional]
|
||||
**arrayArrayOfModel** | **[[ReadOnlyFirst]]** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# 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]
|
||||
|
||||
|
||||
9
samples/client/petstore/javascript-apollo/docs/Cat.md
Normal file
9
samples/client/petstore/javascript-apollo/docs/Cat.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.Cat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.CatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Number** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**name** | **String** | | [default to 'default-name']
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.ClassModel
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_class** | **String** | | [optional]
|
||||
|
||||
|
||||
9
samples/client/petstore/javascript-apollo/docs/Client.md
Normal file
9
samples/client/petstore/javascript-apollo/docs/Client.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.Client
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**client** | **String** | | [optional]
|
||||
|
||||
|
||||
48
samples/client/petstore/javascript-apollo/docs/DefaultApi.md
Normal file
48
samples/client/petstore/javascript-apollo/docs/DefaultApi.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# OpenApiPetstore.DefaultApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo |
|
||||
|
||||
|
||||
|
||||
## fooGet
|
||||
|
||||
> FooGetDefaultResponse 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
|
||||
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.DeprecatedObject
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
9
samples/client/petstore/javascript-apollo/docs/Dog.md
Normal file
9
samples/client/petstore/javascript-apollo/docs/Dog.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.Dog
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.DogAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
32
samples/client/petstore/javascript-apollo/docs/EnumArrays.md
Normal file
32
samples/client/petstore/javascript-apollo/docs/EnumArrays.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# OpenApiPetstore.EnumArrays
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**justSymbol** | **String** | | [optional]
|
||||
**arrayEnum** | **[String]** | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: JustSymbolEnum
|
||||
|
||||
|
||||
* `GREATER_THAN_OR_EQUAL_TO` (value: `">="`)
|
||||
|
||||
* `DOLLAR` (value: `"$"`)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Enum: [ArrayEnumEnum]
|
||||
|
||||
|
||||
* `fish` (value: `"fish"`)
|
||||
|
||||
* `crab` (value: `"crab"`)
|
||||
|
||||
|
||||
|
||||
|
||||
12
samples/client/petstore/javascript-apollo/docs/EnumClass.md
Normal file
12
samples/client/petstore/javascript-apollo/docs/EnumClass.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# OpenApiPetstore.EnumClass
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `_abc` (value: `"_abc"`)
|
||||
|
||||
* `-efg` (value: `"-efg"`)
|
||||
|
||||
* `(xyz)` (value: `"(xyz)"`)
|
||||
|
||||
|
||||
64
samples/client/petstore/javascript-apollo/docs/EnumTest.md
Normal file
64
samples/client/petstore/javascript-apollo/docs/EnumTest.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# OpenApiPetstore.EnumTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enumString** | **String** | | [optional]
|
||||
**enumStringRequired** | **String** | |
|
||||
**enumInteger** | **Number** | | [optional]
|
||||
**enumNumber** | **Number** | | [optional]
|
||||
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
|
||||
**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
|
||||
**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
|
||||
**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: EnumStringEnum
|
||||
|
||||
|
||||
* `UPPER` (value: `"UPPER"`)
|
||||
|
||||
* `lower` (value: `"lower"`)
|
||||
|
||||
* `empty` (value: `""`)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Enum: EnumStringRequiredEnum
|
||||
|
||||
|
||||
* `UPPER` (value: `"UPPER"`)
|
||||
|
||||
* `lower` (value: `"lower"`)
|
||||
|
||||
* `empty` (value: `""`)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Enum: EnumIntegerEnum
|
||||
|
||||
|
||||
* `1` (value: `1`)
|
||||
|
||||
* `-1` (value: `-1`)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Enum: EnumNumberEnum
|
||||
|
||||
|
||||
* `1.1` (value: `1.1`)
|
||||
|
||||
* `-1.2` (value: `-1.2`)
|
||||
|
||||
|
||||
|
||||
|
||||
880
samples/client/petstore/javascript-apollo/docs/FakeApi.md
Normal file
880
samples/client/petstore/javascript-apollo/docs/FakeApi.md
Normal file
@@ -0,0 +1,880 @@
|
||||
# OpenApiPetstore.FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint
|
||||
[**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication
|
||||
[**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 |
|
||||
[**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int |
|
||||
[**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary |
|
||||
[**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
|
||||
[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters |
|
||||
|
||||
|
||||
|
||||
## fakeHealthGet
|
||||
|
||||
> HealthCheckResult fakeHealthGet()
|
||||
|
||||
Health check endpoint
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
apiInstance.fakeHealthGet((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
|
||||
|
||||
[**HealthCheckResult**](HealthCheckResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## fakeHttpSignatureTest
|
||||
|
||||
> fakeHttpSignatureTest(pet, opts)
|
||||
|
||||
test http signature authentication
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
|
||||
let opts = {
|
||||
'query1': "query1_example", // String | query parameter
|
||||
'header1': "header1_example" // String | header parameter
|
||||
};
|
||||
apiInstance.fakeHttpSignatureTest(pet, opts, (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 |
|
||||
**query1** | **String**| query parameter | [optional]
|
||||
**header1** | **String**| header parameter | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[http_signature_test](../README.md#http_signature_test)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## 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**: */*
|
||||
|
||||
|
||||
## 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**: */*
|
||||
|
||||
|
||||
## 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**: */*
|
||||
|
||||
|
||||
## 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**: */*
|
||||
|
||||
|
||||
## fakePropertyEnumIntegerSerialize
|
||||
|
||||
> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty)
|
||||
|
||||
|
||||
|
||||
Test serialization of enum (int) properties with examples
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let outerObjectWithEnumProperty = new OpenApiPetstore.OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body
|
||||
apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body |
|
||||
|
||||
### Return type
|
||||
|
||||
[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
## testBodyWithBinary
|
||||
|
||||
> testBodyWithBinary(body)
|
||||
|
||||
|
||||
|
||||
For this test, the body has to be a binary file.
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let body = "/path/to/file"; // File | image to upload
|
||||
apiInstance.testBodyWithBinary(body, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **File**| image to upload |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: image/png
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## testBodyWithFileSchema
|
||||
|
||||
> testBodyWithFileSchema(fileSchemaTestClass)
|
||||
|
||||
|
||||
|
||||
For this test, the body for this request must 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
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
## 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)
|
||||
'enumQueryModelArray': [new OpenApiPetstore.EnumClass()], // [EnumClass] |
|
||||
'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]
|
||||
**enumQueryModelArray** | [**[EnumClass]**](EnumClass.md)| | [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
|
||||
|
||||
|
||||
## 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 defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
// Configure Bearer (JWT) access token for authorization: bearer_test
|
||||
let bearer_test = defaultClient.authentications['bearer_test'];
|
||||
bearer_test.accessToken = "YOUR ACCESS TOKEN"
|
||||
|
||||
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
|
||||
|
||||
[bearer_test](../README.md#bearer_test)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
## testQueryParameterCollectionFormat
|
||||
|
||||
> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, opts)
|
||||
|
||||
|
||||
|
||||
To test the collection format in query parameters
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let pipe = ["null"]; // [String] |
|
||||
let ioutil = ["null"]; // [String] |
|
||||
let http = ["null"]; // [String] |
|
||||
let url = ["null"]; // [String] |
|
||||
let context = ["null"]; // [String] |
|
||||
let allowEmpty = "allowEmpty_example"; // String |
|
||||
let opts = {
|
||||
'language': {key: "null"} // {String: String} |
|
||||
};
|
||||
apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pipe** | [**[String]**](String.md)| |
|
||||
**ioutil** | [**[String]**](String.md)| |
|
||||
**http** | [**[String]**](String.md)| |
|
||||
**url** | [**[String]**](String.md)| |
|
||||
**context** | [**[String]**](String.md)| |
|
||||
**allowEmpty** | **String**| |
|
||||
**language** | [**{String: String}**](String.md)| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
9
samples/client/petstore/javascript-apollo/docs/File.md
Normal file
9
samples/client/petstore/javascript-apollo/docs/File.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.File
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sourceURI** | **String** | Test capitalization | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OpenApiPetstore.FileSchemaTestClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**file** | **File** | | [optional]
|
||||
**files** | **[File]** | | [optional]
|
||||
|
||||
|
||||
9
samples/client/petstore/javascript-apollo/docs/Foo.md
Normal file
9
samples/client/petstore/javascript-apollo/docs/Foo.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.Foo
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional] [default to 'bar']
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.FooGetDefaultResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**string** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
|
||||
24
samples/client/petstore/javascript-apollo/docs/FormatTest.md
Normal file
24
samples/client/petstore/javascript-apollo/docs/FormatTest.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# OpenApiPetstore.FormatTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **Number** | | [optional]
|
||||
**int32** | **Number** | | [optional]
|
||||
**int64** | **Number** | | [optional]
|
||||
**number** | **Number** | |
|
||||
**_float** | **Number** | | [optional]
|
||||
**_double** | **Number** | | [optional]
|
||||
**decimal** | **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,10 @@
|
||||
# OpenApiPetstore.HasOnlyReadOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional] [readonly]
|
||||
**foo** | **String** | | [optional] [readonly]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.HealthCheckResult
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**nullableMessage** | **String** | | [optional]
|
||||
|
||||
|
||||
9
samples/client/petstore/javascript-apollo/docs/List.md
Normal file
9
samples/client/petstore/javascript-apollo/docs/List.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.List
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_123list** | **String** | | [optional]
|
||||
|
||||
|
||||
23
samples/client/petstore/javascript-apollo/docs/MapTest.md
Normal file
23
samples/client/petstore/javascript-apollo/docs/MapTest.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# OpenApiPetstore.MapTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapMapOfString** | **{String: {String: String}}** | | [optional]
|
||||
**mapOfEnumString** | **{String: String}** | | [optional]
|
||||
**directMap** | **{String: Boolean}** | | [optional]
|
||||
**indirectMap** | **{String: Boolean}** | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: {String: String}
|
||||
|
||||
|
||||
* `UPPER` (value: `"UPPER"`)
|
||||
|
||||
* `lower` (value: `"lower"`)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | **String** | | [optional]
|
||||
**dateTime** | **Date** | | [optional]
|
||||
**map** | [**{String: Animal}**](Animal.md) | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OpenApiPetstore.Model200Response
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **Number** | | [optional]
|
||||
**_class** | **String** | | [optional]
|
||||
|
||||
|
||||
12
samples/client/petstore/javascript-apollo/docs/Name.md
Normal file
12
samples/client/petstore/javascript-apollo/docs/Name.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# OpenApiPetstore.Name
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **Number** | |
|
||||
**snakeCase** | **Number** | | [optional] [readonly]
|
||||
**property** | **String** | | [optional]
|
||||
**_123number** | **Number** | | [optional] [readonly]
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# OpenApiPetstore.NullableClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integerProp** | **Number** | | [optional]
|
||||
**numberProp** | **Number** | | [optional]
|
||||
**booleanProp** | **Boolean** | | [optional]
|
||||
**stringProp** | **String** | | [optional]
|
||||
**dateProp** | **Date** | | [optional]
|
||||
**datetimeProp** | **Date** | | [optional]
|
||||
**arrayNullableProp** | **[Object]** | | [optional]
|
||||
**arrayAndItemsNullableProp** | **[Object]** | | [optional]
|
||||
**arrayItemsNullable** | **[Object]** | | [optional]
|
||||
**objectNullableProp** | **{String: Object}** | | [optional]
|
||||
**objectAndItemsNullableProp** | **{String: Object}** | | [optional]
|
||||
**objectItemsNullable** | **{String: Object}** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.NumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**justNumber** | **Number** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# OpenApiPetstore.ObjectWithDeprecatedFields
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | **String** | | [optional]
|
||||
**id** | **Number** | | [optional]
|
||||
**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional]
|
||||
**bars** | **[String]** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# OpenApiPetstore.OuterComposite
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**myNumber** | **Number** | | [optional]
|
||||
**myString** | **String** | | [optional]
|
||||
**myBoolean** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
12
samples/client/petstore/javascript-apollo/docs/OuterEnum.md
Normal file
12
samples/client/petstore/javascript-apollo/docs/OuterEnum.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# OpenApiPetstore.OuterEnum
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `placed` (value: `"placed"`)
|
||||
|
||||
* `approved` (value: `"approved"`)
|
||||
|
||||
* `delivered` (value: `"delivered"`)
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# OpenApiPetstore.OuterEnumDefaultValue
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `placed` (value: `"placed"`)
|
||||
|
||||
* `approved` (value: `"approved"`)
|
||||
|
||||
* `delivered` (value: `"delivered"`)
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# OpenApiPetstore.OuterEnumInteger
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `0` (value: `0`)
|
||||
|
||||
* `1` (value: `1`)
|
||||
|
||||
* `2` (value: `2`)
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# OpenApiPetstore.OuterEnumIntegerDefaultValue
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `0` (value: `0`)
|
||||
|
||||
* `1` (value: `1`)
|
||||
|
||||
* `2` (value: `2`)
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.OuterObjectWithEnumProperty
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | [**OuterEnumInteger**](OuterEnumInteger.md) | |
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenApiPetstore.PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
@@ -12,15 +12,18 @@ Method | HTTP request | Description
|
||||
[**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)
|
||||
|
||||
|
||||
|
||||
## addPet
|
||||
|
||||
> addPet(body)
|
||||
> addPet(pet)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
@@ -31,8 +34,8 @@ let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
|
||||
apiInstance.addPet(body, (error, data, response) => {
|
||||
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 {
|
||||
@@ -46,7 +49,7 @@ apiInstance.addPet(body, (error, data, response) => {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -68,6 +71,8 @@ null (empty response body)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
@@ -264,10 +269,12 @@ Name | Type | Description | Notes
|
||||
|
||||
## updatePet
|
||||
|
||||
> updatePet(body)
|
||||
> updatePet(pet)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
@@ -278,8 +285,8 @@ let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
|
||||
apiInstance.updatePet(body, (error, data, response) => {
|
||||
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 {
|
||||
@@ -293,7 +300,7 @@ apiInstance.updatePet(body, (error, data, response) => {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -315,6 +322,8 @@ null (empty response body)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
@@ -368,6 +377,8 @@ null (empty response body)
|
||||
|
||||
uploads an image
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
@@ -414,3 +425,58 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## 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,10 @@
|
||||
# OpenApiPetstore.ReadOnlyFirst
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional] [readonly]
|
||||
**baz** | **String** | | [optional]
|
||||
|
||||
|
||||
9
samples/client/petstore/javascript-apollo/docs/Return.md
Normal file
9
samples/client/petstore/javascript-apollo/docs/Return.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.Return
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_return** | **Number** | | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.SpecialModelName
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**specialPropertyName** | **Number** | | [optional]
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# OpenApiPetstore.StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**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/{orderId} | Find purchase order by ID
|
||||
[**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
|
||||
|
||||
|
||||
@@ -150,18 +150,20 @@ No authorization required
|
||||
|
||||
## placeOrder
|
||||
|
||||
> Order placeOrder(body)
|
||||
> Order placeOrder(order)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.StoreApi();
|
||||
let body = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet
|
||||
apiInstance.placeOrder(body, (error, data, response) => {
|
||||
let order = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet
|
||||
apiInstance.placeOrder(order, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
@@ -175,7 +177,7 @@ apiInstance.placeOrder(body, (error, data, response) => {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -187,6 +189,6 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenApiPetstore.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
@@ -17,7 +17,7 @@ Method | HTTP request | Description
|
||||
|
||||
## createUser
|
||||
|
||||
> createUser(body)
|
||||
> createUser(user)
|
||||
|
||||
Create user
|
||||
|
||||
@@ -29,8 +29,8 @@ This can only be done by the logged in user.
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
let body = new OpenApiPetstore.User(); // User | Created user object
|
||||
apiInstance.createUser(body, (error, data, response) => {
|
||||
let user = new OpenApiPetstore.User(); // User | Created user object
|
||||
apiInstance.createUser(user, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
@@ -44,7 +44,7 @@ apiInstance.createUser(body, (error, data, response) => {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
**user** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -56,24 +56,26 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## createUsersWithArrayInput
|
||||
|
||||
> createUsersWithArrayInput(body)
|
||||
> createUsersWithArrayInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
let body = [new OpenApiPetstore.User()]; // [User] | List of user object
|
||||
apiInstance.createUsersWithArrayInput(body, (error, data, response) => {
|
||||
let user = [new OpenApiPetstore.User()]; // [User] | List of user object
|
||||
apiInstance.createUsersWithArrayInput(user, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
@@ -87,7 +89,7 @@ apiInstance.createUsersWithArrayInput(body, (error, data, response) => {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**[User]**](User.md)| List of user object |
|
||||
**user** | [**[User]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -99,24 +101,26 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
## createUsersWithListInput
|
||||
|
||||
> createUsersWithListInput(body)
|
||||
> createUsersWithListInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
let body = [new OpenApiPetstore.User()]; // [User] | List of user object
|
||||
apiInstance.createUsersWithListInput(body, (error, data, response) => {
|
||||
let user = [new OpenApiPetstore.User()]; // [User] | List of user object
|
||||
apiInstance.createUsersWithListInput(user, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
@@ -130,7 +134,7 @@ apiInstance.createUsersWithListInput(body, (error, data, response) => {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**[User]**](User.md)| List of user object |
|
||||
**user** | [**[User]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -142,7 +146,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
@@ -197,6 +201,8 @@ No authorization required
|
||||
|
||||
Get user by user name
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
@@ -240,6 +246,8 @@ No authorization required
|
||||
|
||||
Logs user into the system
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
@@ -285,6 +293,8 @@ No authorization required
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
@@ -320,7 +330,7 @@ No authorization required
|
||||
|
||||
## updateUser
|
||||
|
||||
> updateUser(username, body)
|
||||
> updateUser(username, user)
|
||||
|
||||
Updated user
|
||||
|
||||
@@ -333,8 +343,8 @@ import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.UserApi();
|
||||
let username = "username_example"; // String | name that need to be deleted
|
||||
let body = new OpenApiPetstore.User(); // User | Updated user object
|
||||
apiInstance.updateUser(username, body, (error, data, response) => {
|
||||
let user = new OpenApiPetstore.User(); // User | Updated user object
|
||||
apiInstance.updateUser(username, user, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
@@ -349,7 +359,7 @@ apiInstance.updateUser(username, body, (error, data, response) => {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| name that need to be deleted |
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
**user** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -361,6 +371,6 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
Reference in New Issue
Block a user