From 1b501a52dd39e0edf9d340c5948e49424e5f5442 Mon Sep 17 00:00:00 2001 From: wing328 <wing328hk@gmail.com> Date: Sun, 13 May 2018 01:29:54 +0800 Subject: [PATCH 1/2] fix js test using baseName in default value --- .../languages/JavascriptClientCodegen.java | 2 +- .../docs/AdditionalPropertiesClass.md | 9 - .../client/petstore/javascript/docs/Animal.md | 9 - .../petstore/javascript/docs/AnimalFarm.md | 7 - .../javascript/docs/AnotherFakeApi.md | 52 -- .../petstore/javascript/docs/ApiResponse.md | 10 - .../docs/ArrayOfArrayOfNumberOnly.md | 8 - .../javascript/docs/ArrayOfNumberOnly.md | 8 - .../petstore/javascript/docs/ArrayTest.md | 10 - .../javascript/docs/Capitalization.md | 13 - .../client/petstore/javascript/docs/Cat.md | 8 - .../petstore/javascript/docs/Category.md | 9 - .../petstore/javascript/docs/ClassModel.md | 8 - .../client/petstore/javascript/docs/Client.md | 8 - .../client/petstore/javascript/docs/Dog.md | 8 - .../petstore/javascript/docs/EnumArrays.md | 31 -- .../petstore/javascript/docs/EnumClass.md | 12 - .../petstore/javascript/docs/EnumTest.md | 60 --- .../petstore/javascript/docs/FakeApi.md | 504 ------------------ .../docs/FakeClassnameTags123Api.md | 58 -- .../docs/Fake_classname_tags123Api.md | 60 --- .../petstore/javascript/docs/FormatTest.md | 20 - .../javascript/docs/HasOnlyReadOnly.md | 9 - .../client/petstore/javascript/docs/List.md | 8 - .../petstore/javascript/docs/MapTest.md | 20 - ...dPropertiesAndAdditionalPropertiesClass.md | 10 - .../javascript/docs/Model200Response.md | 9 - .../petstore/javascript/docs/ModelReturn.md | 8 - .../client/petstore/javascript/docs/Name.md | 11 - .../petstore/javascript/docs/NumberOnly.md | 8 - .../client/petstore/javascript/docs/Order.md | 26 - .../petstore/javascript/docs/OuterBoolean.md | 7 - .../javascript/docs/OuterComposite.md | 10 - .../petstore/javascript/docs/OuterEnum.md | 12 - .../petstore/javascript/docs/OuterNumber.md | 7 - .../petstore/javascript/docs/OuterString.md | 7 - .../client/petstore/javascript/docs/Pet.md | 26 - .../client/petstore/javascript/docs/PetApi.md | 400 -------------- .../petstore/javascript/docs/ReadOnlyFirst.md | 9 - .../javascript/docs/SpecialModelName.md | 8 - .../petstore/javascript/docs/StoreApi.md | 184 ------- .../client/petstore/javascript/docs/Tag.md | 9 - .../client/petstore/javascript/docs/User.md | 15 - .../petstore/javascript/docs/UserApi.md | 350 ------------ samples/client/petstore/javascript/pom.xml | 6 +- .../src/api/Fake_classname_tags123Api.js | 99 ---- .../petstore/javascript/src/model/EnumTest.js | 2 +- .../javascript/src/model/OuterBoolean.js | 10 +- .../javascript/src/model/OuterComposite.js | 6 +- .../javascript/src/model/OuterNumber.js | 10 +- .../javascript/src/model/OuterString.js | 10 +- .../petstore/javascript/src/model/Pet.js | 2 +- .../petstore/javascript/test/ApiClientTest.js | 12 +- .../test/api/AnotherFakeApi.spec.js | 15 +- .../javascript/test/api/FakeApi.spec.js | 6 +- .../test/api/FakeClassnameTags123Api.spec.js | 15 +- .../javascript/test/api/PetApi.spec.js | 18 +- .../javascript/test/api/StoreApi.spec.js | 6 +- .../javascript/test/api/UserApi.spec.js | 6 +- .../model/AdditionalPropertiesClass.spec.js | 14 +- .../javascript/test/model/Animal.spec.js | 14 +- .../javascript/test/model/AnimalFarm.spec.js | 10 +- .../javascript/test/model/ApiResponse.spec.js | 16 +- .../model/ArrayOfArrayOfNumberOnly.spec.js | 14 +- .../test/model/ArrayOfNumberOnly.spec.js | 14 +- .../javascript/test/model/ArrayTest.spec.js | 16 +- .../test/model/Capitalization.spec.js | 24 +- .../javascript/test/model/Cat.spec.js | 12 +- .../javascript/test/model/Category.spec.js | 14 +- .../javascript/test/model/ClassModel.spec.js | 14 +- .../javascript/test/model/Client.spec.js | 14 +- .../javascript/test/model/Dog.spec.js | 12 +- .../javascript/test/model/EnumArrays.spec.js | 16 +- .../javascript/test/model/EnumClass.spec.js | 8 +- .../javascript/test/model/EnumTest.spec.js | 16 +- .../javascript/test/model/FormatTest.spec.js | 36 +- .../test/model/HasOnlyReadOnly.spec.js | 16 +- .../javascript/test/model/List.spec.js | 14 +- .../javascript/test/model/MapTest.spec.js | 18 +- ...ertiesAndAdditionalPropertiesClass.spec.js | 16 +- .../test/model/Model200Response.spec.js | 12 +- .../javascript/test/model/ModelReturn.spec.js | 12 +- .../javascript/test/model/Name.spec.js | 18 +- .../javascript/test/model/NumberOnly.spec.js | 14 +- .../javascript/test/model/Order.spec.js | 22 +- .../test/model/OuterComposite.spec.js | 18 +- .../javascript/test/model/OuterEnum.spec.js | 10 +- .../javascript/test/model/Pet.spec.js | 22 +- .../test/model/ReadOnlyFirst.spec.js | 14 +- .../test/model/SpecialModelName.spec.js | 12 +- .../javascript/test/model/Tag.spec.js | 14 +- .../javascript/test/model/User.spec.js | 26 +- 92 files changed, 323 insertions(+), 2489 deletions(-) delete mode 100644 samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md delete mode 100644 samples/client/petstore/javascript/docs/Animal.md delete mode 100644 samples/client/petstore/javascript/docs/AnimalFarm.md delete mode 100644 samples/client/petstore/javascript/docs/AnotherFakeApi.md delete mode 100644 samples/client/petstore/javascript/docs/ApiResponse.md delete mode 100644 samples/client/petstore/javascript/docs/ArrayOfArrayOfNumberOnly.md delete mode 100644 samples/client/petstore/javascript/docs/ArrayOfNumberOnly.md delete mode 100644 samples/client/petstore/javascript/docs/ArrayTest.md delete mode 100644 samples/client/petstore/javascript/docs/Capitalization.md delete mode 100644 samples/client/petstore/javascript/docs/Cat.md delete mode 100644 samples/client/petstore/javascript/docs/Category.md delete mode 100644 samples/client/petstore/javascript/docs/ClassModel.md delete mode 100644 samples/client/petstore/javascript/docs/Client.md delete mode 100644 samples/client/petstore/javascript/docs/Dog.md delete mode 100644 samples/client/petstore/javascript/docs/EnumArrays.md delete mode 100644 samples/client/petstore/javascript/docs/EnumClass.md delete mode 100644 samples/client/petstore/javascript/docs/EnumTest.md delete mode 100644 samples/client/petstore/javascript/docs/FakeApi.md delete mode 100644 samples/client/petstore/javascript/docs/FakeClassnameTags123Api.md delete mode 100644 samples/client/petstore/javascript/docs/Fake_classname_tags123Api.md delete mode 100644 samples/client/petstore/javascript/docs/FormatTest.md delete mode 100644 samples/client/petstore/javascript/docs/HasOnlyReadOnly.md delete mode 100644 samples/client/petstore/javascript/docs/List.md delete mode 100644 samples/client/petstore/javascript/docs/MapTest.md delete mode 100644 samples/client/petstore/javascript/docs/MixedPropertiesAndAdditionalPropertiesClass.md delete mode 100644 samples/client/petstore/javascript/docs/Model200Response.md delete mode 100644 samples/client/petstore/javascript/docs/ModelReturn.md delete mode 100644 samples/client/petstore/javascript/docs/Name.md delete mode 100644 samples/client/petstore/javascript/docs/NumberOnly.md delete mode 100644 samples/client/petstore/javascript/docs/Order.md delete mode 100644 samples/client/petstore/javascript/docs/OuterBoolean.md delete mode 100644 samples/client/petstore/javascript/docs/OuterComposite.md delete mode 100644 samples/client/petstore/javascript/docs/OuterEnum.md delete mode 100644 samples/client/petstore/javascript/docs/OuterNumber.md delete mode 100644 samples/client/petstore/javascript/docs/OuterString.md delete mode 100644 samples/client/petstore/javascript/docs/Pet.md delete mode 100644 samples/client/petstore/javascript/docs/PetApi.md delete mode 100644 samples/client/petstore/javascript/docs/ReadOnlyFirst.md delete mode 100644 samples/client/petstore/javascript/docs/SpecialModelName.md delete mode 100644 samples/client/petstore/javascript/docs/StoreApi.md delete mode 100644 samples/client/petstore/javascript/docs/Tag.md delete mode 100644 samples/client/petstore/javascript/docs/User.md delete mode 100644 samples/client/petstore/javascript/docs/UserApi.md delete mode 100644 samples/client/petstore/javascript/src/api/Fake_classname_tags123Api.js diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index 8e78db831f2..612a2fba387 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -617,7 +617,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo public String toDefaultValueWithParam(String name, Schema p) { String type = normalizeType(getTypeDeclaration(p)); if (!StringUtils.isEmpty(p.get$ref())) { - return " = " + type + ".constructFromObject(data['" + getSchemaType(p) + "']);"; + return " = " + type + ".constructFromObject(data['" + name + "']);"; } else { return " = ApiClient.convertToType(data['" + name + "'], " + type + ");"; } diff --git a/samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md b/samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md deleted file mode 100644 index 7df1c7b3394..00000000000 --- a/samples/client/petstore/javascript/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.AdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapProperty** | **{String: String}** | | [optional] -**mapOfMapProperty** | **{String: {String: String}}** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/Animal.md b/samples/client/petstore/javascript/docs/Animal.md deleted file mode 100644 index 7bff0167581..00000000000 --- a/samples/client/petstore/javascript/docs/Animal.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.Animal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to 'red'] - - diff --git a/samples/client/petstore/javascript/docs/AnimalFarm.md b/samples/client/petstore/javascript/docs/AnimalFarm.md deleted file mode 100644 index ab153513ca9..00000000000 --- a/samples/client/petstore/javascript/docs/AnimalFarm.md +++ /dev/null @@ -1,7 +0,0 @@ -# OpenApiPetstore.AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/samples/client/petstore/javascript/docs/AnotherFakeApi.md b/samples/client/petstore/javascript/docs/AnotherFakeApi.md deleted file mode 100644 index 4529aa0c18b..00000000000 --- a/samples/client/petstore/javascript/docs/AnotherFakeApi.md +++ /dev/null @@ -1,52 +0,0 @@ -# OpenApiPetstore.AnotherFakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags - - -<a name="testSpecialTags"></a> -# **testSpecialTags** -> Client testSpecialTags(client) - -To test special tags - -To test special tags - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = 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); - } -}; -apiInstance.testSpecialTags(client, callback); -``` - -### 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 - diff --git a/samples/client/petstore/javascript/docs/ApiResponse.md b/samples/client/petstore/javascript/docs/ApiResponse.md deleted file mode 100644 index e60378fcbfc..00000000000 --- a/samples/client/petstore/javascript/docs/ApiResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.ApiResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Number** | | [optional] -**type** | **String** | | [optional] -**message** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/javascript/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index 7a1426ef818..00000000000 --- a/samples/client/petstore/javascript/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenApiPetstore.ArrayOfArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | **[[Number]]** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/ArrayOfNumberOnly.md b/samples/client/petstore/javascript/docs/ArrayOfNumberOnly.md deleted file mode 100644 index 7cec2e71d4b..00000000000 --- a/samples/client/petstore/javascript/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenApiPetstore.ArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **[Number]** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/ArrayTest.md b/samples/client/petstore/javascript/docs/ArrayTest.md deleted file mode 100644 index 5828f6ee75b..00000000000 --- a/samples/client/petstore/javascript/docs/ArrayTest.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.ArrayTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **[String]** | | [optional] -**arrayArrayOfInteger** | **[[Number]]** | | [optional] -**arrayArrayOfModel** | **[[ReadOnlyFirst]]** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/Capitalization.md b/samples/client/petstore/javascript/docs/Capitalization.md deleted file mode 100644 index abeff984c62..00000000000 --- a/samples/client/petstore/javascript/docs/Capitalization.md +++ /dev/null @@ -1,13 +0,0 @@ -# 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] - - diff --git a/samples/client/petstore/javascript/docs/Cat.md b/samples/client/petstore/javascript/docs/Cat.md deleted file mode 100644 index 6dd0f057c85..00000000000 --- a/samples/client/petstore/javascript/docs/Cat.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenApiPetstore.Cat - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/Category.md b/samples/client/petstore/javascript/docs/Category.md deleted file mode 100644 index e3f934442ab..00000000000 --- a/samples/client/petstore/javascript/docs/Category.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.Category - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Number** | | [optional] -**name** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/ClassModel.md b/samples/client/petstore/javascript/docs/ClassModel.md deleted file mode 100644 index 6fe9c501a5d..00000000000 --- a/samples/client/petstore/javascript/docs/ClassModel.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenApiPetstore.ClassModel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_class** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/Client.md b/samples/client/petstore/javascript/docs/Client.md deleted file mode 100644 index a6c7711e74e..00000000000 --- a/samples/client/petstore/javascript/docs/Client.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenApiPetstore.Client - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/Dog.md b/samples/client/petstore/javascript/docs/Dog.md deleted file mode 100644 index f35663407e8..00000000000 --- a/samples/client/petstore/javascript/docs/Dog.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenApiPetstore.Dog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/EnumArrays.md b/samples/client/petstore/javascript/docs/EnumArrays.md deleted file mode 100644 index 5f624e5db48..00000000000 --- a/samples/client/petstore/javascript/docs/EnumArrays.md +++ /dev/null @@ -1,31 +0,0 @@ -# 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"`) - - - - diff --git a/samples/client/petstore/javascript/docs/EnumClass.md b/samples/client/petstore/javascript/docs/EnumClass.md deleted file mode 100644 index cef9bb57a56..00000000000 --- a/samples/client/petstore/javascript/docs/EnumClass.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenApiPetstore.EnumClass - -## Enum - - -* `_abc` (value: `"_abc"`) - -* `-efg` (value: `"-efg"`) - -* `(xyz)` (value: `"(xyz)"`) - - diff --git a/samples/client/petstore/javascript/docs/EnumTest.md b/samples/client/petstore/javascript/docs/EnumTest.md deleted file mode 100644 index c9e7ce86fea..00000000000 --- a/samples/client/petstore/javascript/docs/EnumTest.md +++ /dev/null @@ -1,60 +0,0 @@ -# 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`) - - - - diff --git a/samples/client/petstore/javascript/docs/FakeApi.md b/samples/client/petstore/javascript/docs/FakeApi.md deleted file mode 100644 index cf9654ab597..00000000000 --- a/samples/client/petstore/javascript/docs/FakeApi.md +++ /dev/null @@ -1,504 +0,0 @@ -# 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 | -[**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 -[**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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.FakeApi(); -var opts = { - 'body': true // Boolean | Input boolean as post body -}; -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.fakeOuterBooleanSerialize(opts, callback); -``` - -### 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**: Not defined - - **Accept**: */* - -<a name="fakeOuterCompositeSerialize"></a> -# **fakeOuterCompositeSerialize** -> OuterComposite fakeOuterCompositeSerialize(opts) - - - -Test serialization of object with outer number type - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.FakeApi(); -var opts = { - 'outerComposite': new OpenApiPetstore.OuterComposite() // OuterComposite | Input composite as post body -}; -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.fakeOuterCompositeSerialize(opts, callback); -``` - -### 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**: Not defined - - **Accept**: */* - -<a name="fakeOuterNumberSerialize"></a> -# **fakeOuterNumberSerialize** -> Number fakeOuterNumberSerialize(opts) - - - -Test serialization of outer number types - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.FakeApi(); -var opts = { - 'body': 3.4 // Number | Input number as post body -}; -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.fakeOuterNumberSerialize(opts, callback); -``` - -### 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**: Not defined - - **Accept**: */* - -<a name="fakeOuterStringSerialize"></a> -# **fakeOuterStringSerialize** -> String fakeOuterStringSerialize(opts) - - - -Test serialization of outer string types - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.FakeApi(); -var opts = { - 'body': "body_example" // String | Input string as post body -}; -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.fakeOuterStringSerialize(opts, callback); -``` - -### 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**: Not defined - - **Accept**: */* - -<a name="testBodyWithQueryParams"></a> -# **testBodyWithQueryParams** -> testBodyWithQueryParams(query, user) - - - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.FakeApi(); -var query = "query_example"; // String | -var user = new OpenApiPetstore.User(); // User | -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.testBodyWithQueryParams(query, user, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.FakeApi(); -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); - } -}; -apiInstance.testClientModel(client, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; - -// Configure HTTP basic authorization: http_basic_test -var http_basic_test = defaultClient.authentications['http_basic_test']; -http_basic_test.username = 'YOUR USERNAME'; -http_basic_test.password = 'YOUR PASSWORD'; - -var apiInstance = new OpenApiPetstore.FakeApi(); -var _number = 3.4; // Number | None -var _double = 3.4; // Number | None -var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -var _byte = null; // Blob | None -var 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 -}; -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.FakeApi(); -var 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) -}; -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.testEnumParameters(opts, callback); -``` - -### 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]**| 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="testInlineAdditionalProperties"></a> -# **testInlineAdditionalProperties** -> testInlineAdditionalProperties(requestBody) - -test inline additionalProperties - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.FakeApi(); -var requestBody = {key: "inner_example"}; // {String: String} | request body -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.testInlineAdditionalProperties(requestBody, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.FakeApi(); -var param = "param_example"; // String | field1 -var param2 = "param2_example"; // String | field2 -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.testJsonFormData(param, param2, callback); -``` - -### 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 - diff --git a/samples/client/petstore/javascript/docs/FakeClassnameTags123Api.md b/samples/client/petstore/javascript/docs/FakeClassnameTags123Api.md deleted file mode 100644 index 1d0a71149f0..00000000000 --- a/samples/client/petstore/javascript/docs/FakeClassnameTags123Api.md +++ /dev/null @@ -1,58 +0,0 @@ -# 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 -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure API key authorization: api_key_query -var 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'; - -var apiInstance = new OpenApiPetstore.FakeClassnameTags123Api(); -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); - } -}; -apiInstance.testClassname(client, callback); -``` - -### 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 - diff --git a/samples/client/petstore/javascript/docs/Fake_classname_tags123Api.md b/samples/client/petstore/javascript/docs/Fake_classname_tags123Api.md deleted file mode 100644 index 56b882b9671..00000000000 --- a/samples/client/petstore/javascript/docs/Fake_classname_tags123Api.md +++ /dev/null @@ -1,60 +0,0 @@ -# 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 -var SwaggerPetstore = require('swagger_petstore'); -var defaultClient = SwaggerPetstore.ApiClient.instance; - -// Configure API key authorization: api_key_query -var 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'; - -var apiInstance = new SwaggerPetstore.Fake_classname_tags123Api(); - -var body = new SwaggerPetstore.Client(); // Client | client model - - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.testClassname(body, callback); -``` - -### 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 - diff --git a/samples/client/petstore/javascript/docs/FormatTest.md b/samples/client/petstore/javascript/docs/FormatTest.md deleted file mode 100644 index 0f4a8405449..00000000000 --- a/samples/client/petstore/javascript/docs/FormatTest.md +++ /dev/null @@ -1,20 +0,0 @@ -# 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** | | - - diff --git a/samples/client/petstore/javascript/docs/HasOnlyReadOnly.md b/samples/client/petstore/javascript/docs/HasOnlyReadOnly.md deleted file mode 100644 index abc4ce62184..00000000000 --- a/samples/client/petstore/javascript/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.HasOnlyReadOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**foo** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/List.md b/samples/client/petstore/javascript/docs/List.md deleted file mode 100644 index 3a9555e34e0..00000000000 --- a/samples/client/petstore/javascript/docs/List.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenApiPetstore.List - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/MapTest.md b/samples/client/petstore/javascript/docs/MapTest.md deleted file mode 100644 index 4a128da00fd..00000000000 --- a/samples/client/petstore/javascript/docs/MapTest.md +++ /dev/null @@ -1,20 +0,0 @@ -# OpenApiPetstore.MapTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | **{String: {String: String}}** | | [optional] -**mapOfEnumString** | **{String: String}** | | [optional] - - -<a name="{String: String}"></a> -## Enum: {String: String} - - -* `UPPER` (value: `"UPPER"`) - -* `lower` (value: `"lower"`) - - - - diff --git a/samples/client/petstore/javascript/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/javascript/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index 051f771930e..00000000000 --- a/samples/client/petstore/javascript/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **String** | | [optional] -**dateTime** | **Date** | | [optional] -**map** | [**{String: Animal}**](Animal.md) | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/Model200Response.md b/samples/client/petstore/javascript/docs/Model200Response.md deleted file mode 100644 index 0a0d02cc32e..00000000000 --- a/samples/client/petstore/javascript/docs/Model200Response.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.Model200Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Number** | | [optional] -**_class** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/ModelReturn.md b/samples/client/petstore/javascript/docs/ModelReturn.md deleted file mode 100644 index 9ce6e203878..00000000000 --- a/samples/client/petstore/javascript/docs/ModelReturn.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenApiPetstore.ModelReturn - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Number** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/Name.md b/samples/client/petstore/javascript/docs/Name.md deleted file mode 100644 index 8dfcc460361..00000000000 --- a/samples/client/petstore/javascript/docs/Name.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenApiPetstore.Name - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Number** | | -**snakeCase** | **Number** | | [optional] -**property** | **String** | | [optional] -**_123number** | **Number** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/NumberOnly.md b/samples/client/petstore/javascript/docs/NumberOnly.md deleted file mode 100644 index cf84674ed4e..00000000000 --- a/samples/client/petstore/javascript/docs/NumberOnly.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenApiPetstore.NumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **Number** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/Order.md b/samples/client/petstore/javascript/docs/Order.md deleted file mode 100644 index 987992caa70..00000000000 --- a/samples/client/petstore/javascript/docs/Order.md +++ /dev/null @@ -1,26 +0,0 @@ -# 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"`) - - - - diff --git a/samples/client/petstore/javascript/docs/OuterBoolean.md b/samples/client/petstore/javascript/docs/OuterBoolean.md deleted file mode 100644 index 61ea0d56615..00000000000 --- a/samples/client/petstore/javascript/docs/OuterBoolean.md +++ /dev/null @@ -1,7 +0,0 @@ -# SwaggerPetstore.OuterBoolean - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/samples/client/petstore/javascript/docs/OuterComposite.md b/samples/client/petstore/javascript/docs/OuterComposite.md deleted file mode 100644 index c49b32ff329..00000000000 --- a/samples/client/petstore/javascript/docs/OuterComposite.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.OuterComposite - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **Number** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Boolean** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/OuterEnum.md b/samples/client/petstore/javascript/docs/OuterEnum.md deleted file mode 100644 index 445d3f4074c..00000000000 --- a/samples/client/petstore/javascript/docs/OuterEnum.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenApiPetstore.OuterEnum - -## Enum - - -* `placed` (value: `"placed"`) - -* `approved` (value: `"approved"`) - -* `delivered` (value: `"delivered"`) - - diff --git a/samples/client/petstore/javascript/docs/OuterNumber.md b/samples/client/petstore/javascript/docs/OuterNumber.md deleted file mode 100644 index efbbfa83535..00000000000 --- a/samples/client/petstore/javascript/docs/OuterNumber.md +++ /dev/null @@ -1,7 +0,0 @@ -# SwaggerPetstore.OuterNumber - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/samples/client/petstore/javascript/docs/OuterString.md b/samples/client/petstore/javascript/docs/OuterString.md deleted file mode 100644 index 22eba5351a9..00000000000 --- a/samples/client/petstore/javascript/docs/OuterString.md +++ /dev/null @@ -1,7 +0,0 @@ -# SwaggerPetstore.OuterString - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/samples/client/petstore/javascript/docs/Pet.md b/samples/client/petstore/javascript/docs/Pet.md deleted file mode 100644 index e91ae688aad..00000000000 --- a/samples/client/petstore/javascript/docs/Pet.md +++ /dev/null @@ -1,26 +0,0 @@ -# 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"`) - - - - diff --git a/samples/client/petstore/javascript/docs/PetApi.md b/samples/client/petstore/javascript/docs/PetApi.md deleted file mode 100644 index fbcca8372cc..00000000000 --- a/samples/client/petstore/javascript/docs/PetApi.md +++ /dev/null @@ -1,400 +0,0 @@ -# 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 - - -<a name="addPet"></a> -# **addPet** -> addPet(pet) - -Add a new pet to the store - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure OAuth2 access token for authorization: petstore_auth -var petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OpenApiPetstore.PetApi(); -var pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.addPet(pet, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure OAuth2 access token for authorization: petstore_auth -var petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OpenApiPetstore.PetApi(); -var petId = 789; // Number | Pet id to delete -var opts = { - 'apiKey': "apiKey_example" // String | -}; -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.deletePet(petId, opts, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure OAuth2 access token for authorization: petstore_auth -var petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OpenApiPetstore.PetApi(); -var status = ["'available'"]; // [String] | Status values that need to be considered for filter -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.findPetsByStatus(status, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure OAuth2 access token for authorization: petstore_auth -var petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OpenApiPetstore.PetApi(); -var tags = ["inner_example"]; // [String] | Tags to filter by -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.findPetsByTags(tags, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure API key authorization: api_key -var 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'; - -var apiInstance = new OpenApiPetstore.PetApi(); -var petId = 789; // Number | ID of pet to return -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.getPetById(petId, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure OAuth2 access token for authorization: petstore_auth -var petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OpenApiPetstore.PetApi(); -var pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.updatePet(pet, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure OAuth2 access token for authorization: petstore_auth -var petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OpenApiPetstore.PetApi(); -var petId = 789; // Number | ID of pet that needs to be updated -var opts = { - 'name': "name_example", // String | Updated name of the pet - 'status': "status_example" // String | Updated status of the pet -}; -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.updatePetWithForm(petId, opts, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure OAuth2 access token for authorization: petstore_auth -var petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OpenApiPetstore.PetApi(); -var petId = 789; // Number | ID of pet to update -var opts = { - 'additionalMetadata': "additionalMetadata_example", // String | Additional data to pass to server - 'file': "/path/to/file" // File | file to upload -}; -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.uploadFile(petId, opts, callback); -``` - -### 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 - diff --git a/samples/client/petstore/javascript/docs/ReadOnlyFirst.md b/samples/client/petstore/javascript/docs/ReadOnlyFirst.md deleted file mode 100644 index 671280fba33..00000000000 --- a/samples/client/petstore/javascript/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.ReadOnlyFirst - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] -**baz** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/SpecialModelName.md b/samples/client/petstore/javascript/docs/SpecialModelName.md deleted file mode 100644 index 6039f53de36..00000000000 --- a/samples/client/petstore/javascript/docs/SpecialModelName.md +++ /dev/null @@ -1,8 +0,0 @@ -# OpenApiPetstore.SpecialModelName - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**specialPropertyName** | **Number** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/StoreApi.md b/samples/client/petstore/javascript/docs/StoreApi.md deleted file mode 100644 index 6f1e0816f0f..00000000000 --- a/samples/client/petstore/javascript/docs/StoreApi.md +++ /dev/null @@ -1,184 +0,0 @@ -# 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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.StoreApi(); -var orderId = "orderId_example"; // String | ID of the order that needs to be deleted -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.deleteOrder(orderId, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure API key authorization: api_key -var 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'; - -var apiInstance = new OpenApiPetstore.StoreApi(); -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.getInventory(callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.StoreApi(); -var orderId = 789; // Number | ID of pet that needs to be fetched -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.getOrderById(orderId, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.StoreApi(); -var order = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.placeOrder(order, callback); -``` - -### 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**: Not defined - - **Accept**: application/xml, application/json - diff --git a/samples/client/petstore/javascript/docs/Tag.md b/samples/client/petstore/javascript/docs/Tag.md deleted file mode 100644 index a53941e80e0..00000000000 --- a/samples/client/petstore/javascript/docs/Tag.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.Tag - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Number** | | [optional] -**name** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript/docs/User.md b/samples/client/petstore/javascript/docs/User.md deleted file mode 100644 index 2e86dd378bf..00000000000 --- a/samples/client/petstore/javascript/docs/User.md +++ /dev/null @@ -1,15 +0,0 @@ -# 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] - - diff --git a/samples/client/petstore/javascript/docs/UserApi.md b/samples/client/petstore/javascript/docs/UserApi.md deleted file mode 100644 index d75bf078ea4..00000000000 --- a/samples/client/petstore/javascript/docs/UserApi.md +++ /dev/null @@ -1,350 +0,0 @@ -# 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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.UserApi(); -var user = new OpenApiPetstore.User(); // User | Created user object -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.createUser(user, callback); -``` - -### 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**: Not defined - - **Accept**: Not defined - -<a name="createUsersWithArrayInput"></a> -# **createUsersWithArrayInput** -> createUsersWithArrayInput(user) - -Creates list of users with given input array - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.UserApi(); -var user = [new OpenApiPetstore.User()]; // [User] | List of user object -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.createUsersWithArrayInput(user, callback); -``` - -### 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**: Not defined - - **Accept**: Not defined - -<a name="createUsersWithListInput"></a> -# **createUsersWithListInput** -> createUsersWithListInput(user) - -Creates list of users with given input array - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.UserApi(); -var user = [new OpenApiPetstore.User()]; // [User] | List of user object -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.createUsersWithListInput(user, callback); -``` - -### 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**: Not defined - - **Accept**: Not defined - -<a name="deleteUser"></a> -# **deleteUser** -> deleteUser(username) - -Delete user - -This can only be done by the logged in user. - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.UserApi(); -var username = "username_example"; // String | The name that needs to be deleted -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.deleteUser(username, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.UserApi(); -var username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.getUserByName(username, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.UserApi(); -var username = "username_example"; // String | The user name for login -var password = "password_example"; // String | The password for login in clear text -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.loginUser(username, password, callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.UserApi(); -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.logoutUser(callback); -``` - -### 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 -var OpenApiPetstore = require('open_api_petstore'); - -var apiInstance = new OpenApiPetstore.UserApi(); -var username = "username_example"; // String | name that need to be deleted -var user = new OpenApiPetstore.User(); // User | Updated user object -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}; -apiInstance.updateUser(username, user, callback); -``` - -### 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**: Not defined - - **Accept**: Not defined - diff --git a/samples/client/petstore/javascript/pom.xml b/samples/client/petstore/javascript/pom.xml index b7a17c92b79..3d461be4721 100644 --- a/samples/client/petstore/javascript/pom.xml +++ b/samples/client/petstore/javascript/pom.xml @@ -1,10 +1,10 @@ <project> <modelVersion>4.0.0</modelVersion> - <groupId>io.swagger</groupId> - <artifactId>swagger-petstore-javascript</artifactId> + <groupId>org.openapitools</groupId> + <artifactId>openapi-petstore-javascript</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> - <name>Swagger Petstore - Javascript Client</name> + <name>OpenAPI Petstore JS Client</name> <build> <plugins> <plugin> diff --git a/samples/client/petstore/javascript/src/api/Fake_classname_tags123Api.js b/samples/client/petstore/javascript/src/api/Fake_classname_tags123Api.js deleted file mode 100644 index 4ade0b35502..00000000000 --- a/samples/client/petstore/javascript/src/api/Fake_classname_tags123Api.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Swagger 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 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * - * Swagger Codegen version: 2.3.0-SNAPSHOT - * - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['ApiClient', 'model/Client'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('../model/Client')); - } else { - // Browser globals (root is window) - if (!root.SwaggerPetstore) { - root.SwaggerPetstore = {}; - } - root.SwaggerPetstore.Fake_classname_tags123Api = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Client); - } -}(this, function(ApiClient, Client) { - 'use strict'; - - /** - * Fake_classname_tags123 service. - * @module api/Fake_classname_tags123Api - * @version 1.0.0 - */ - - /** - * Constructs a new Fake_classname_tags123Api. - * @alias module:api/Fake_classname_tags123Api - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - var exports = function(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - - - /** - * Callback function to receive the result of the testClassname operation. - * @callback module:api/Fake_classname_tags123Api~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 - * @param {module:model/Client} body client model - * @param {module:api/Fake_classname_tags123Api~testClassnameCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/Client} - */ - this.testClassname = function(body, callback) { - var postBody = body; - - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling testClassname"); - } - - - var pathParams = { - }; - var queryParams = { - }; - var collectionQueryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['api_key_query']; - var contentTypes = ['application/json']; - var accepts = ['application/json']; - var returnType = Client; - - return this.apiClient.callApi( - '/fake_classname_test', 'PATCH', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - }; - - return exports; -})); diff --git a/samples/client/petstore/javascript/src/model/EnumTest.js b/samples/client/petstore/javascript/src/model/EnumTest.js index 23e5ba124e1..a1fa0b75145 100644 --- a/samples/client/petstore/javascript/src/model/EnumTest.js +++ b/samples/client/petstore/javascript/src/model/EnumTest.js @@ -79,7 +79,7 @@ obj['enum_number'] = ApiClient.convertToType(data['enum_number'], 'Number'); } if (data.hasOwnProperty('outerEnum')) { - obj['outerEnum'] = OuterEnum.constructFromObject(data['OuterEnum']); + obj['outerEnum'] = OuterEnum.constructFromObject(data['outerEnum']); } } return obj; diff --git a/samples/client/petstore/javascript/src/model/OuterBoolean.js b/samples/client/petstore/javascript/src/model/OuterBoolean.js index 6c10f1018d1..c199fb07bbe 100644 --- a/samples/client/petstore/javascript/src/model/OuterBoolean.js +++ b/samples/client/petstore/javascript/src/model/OuterBoolean.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.0-SNAPSHOT + * OpenAPI Codegen version: 2.4.0-SNAPSHOT * * Do not edit the class manually. * @@ -23,10 +23,10 @@ module.exports = factory(require('../ApiClient')); } else { // Browser globals (root is window) - if (!root.SwaggerPetstore) { - root.SwaggerPetstore = {}; + if (!root.OpenAPIPetstore) { + root.OpenAPIPetstore = {}; } - root.SwaggerPetstore.OuterBoolean = factory(root.SwaggerPetstore.ApiClient); + root.OpenAPIPetstore.OuterBoolean = factory(root.OpenAPIPetstore.ApiClient); } }(this, function(ApiClient) { 'use strict'; diff --git a/samples/client/petstore/javascript/src/model/OuterComposite.js b/samples/client/petstore/javascript/src/model/OuterComposite.js index dd95c100605..cee1b9a083e 100644 --- a/samples/client/petstore/javascript/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript/src/model/OuterComposite.js @@ -64,13 +64,13 @@ obj = obj || new exports(); if (data.hasOwnProperty('my_number')) { - obj['my_number'] = 'Number'.constructFromObject(data['Number']); + obj['my_number'] = 'Number'.constructFromObject(data['my_number']); } if (data.hasOwnProperty('my_string')) { - obj['my_string'] = 'String'.constructFromObject(data['String']); + obj['my_string'] = 'String'.constructFromObject(data['my_string']); } if (data.hasOwnProperty('my_boolean')) { - obj['my_boolean'] = 'Boolean'.constructFromObject(data['Boolean']); + obj['my_boolean'] = 'Boolean'.constructFromObject(data['my_boolean']); } } return obj; diff --git a/samples/client/petstore/javascript/src/model/OuterNumber.js b/samples/client/petstore/javascript/src/model/OuterNumber.js index 65bcfeb5b14..e511c976d04 100644 --- a/samples/client/petstore/javascript/src/model/OuterNumber.js +++ b/samples/client/petstore/javascript/src/model/OuterNumber.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.0-SNAPSHOT + * OpenAPI Codegen version: 2.4.0-SNAPSHOT * * Do not edit the class manually. * @@ -23,10 +23,10 @@ module.exports = factory(require('../ApiClient')); } else { // Browser globals (root is window) - if (!root.SwaggerPetstore) { - root.SwaggerPetstore = {}; + if (!root.OpenAPIPetstore) { + root.OpenAPIPetstore = {}; } - root.SwaggerPetstore.OuterNumber = factory(root.SwaggerPetstore.ApiClient); + root.OpenAPIPetstore.OuterNumber = factory(root.OpenAPIPetstore.ApiClient); } }(this, function(ApiClient) { 'use strict'; diff --git a/samples/client/petstore/javascript/src/model/OuterString.js b/samples/client/petstore/javascript/src/model/OuterString.js index cae250dc6e3..8c1123dbe5e 100644 --- a/samples/client/petstore/javascript/src/model/OuterString.js +++ b/samples/client/petstore/javascript/src/model/OuterString.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.0-SNAPSHOT + * OpenAPI Codegen version: 2.4.0-SNAPSHOT * * Do not edit the class manually. * @@ -23,10 +23,10 @@ module.exports = factory(require('../ApiClient')); } else { // Browser globals (root is window) - if (!root.SwaggerPetstore) { - root.SwaggerPetstore = {}; + if (!root.OpenAPIPetstore) { + root.OpenAPIPetstore = {}; } - root.SwaggerPetstore.OuterString = factory(root.SwaggerPetstore.ApiClient); + root.OpenAPIPetstore.OuterString = factory(root.OpenAPIPetstore.ApiClient); } }(this, function(ApiClient) { 'use strict'; diff --git a/samples/client/petstore/javascript/src/model/Pet.js b/samples/client/petstore/javascript/src/model/Pet.js index c904719c8d2..ff1df0c02f1 100644 --- a/samples/client/petstore/javascript/src/model/Pet.js +++ b/samples/client/petstore/javascript/src/model/Pet.js @@ -72,7 +72,7 @@ obj['id'] = ApiClient.convertToType(data['id'], 'Number'); } if (data.hasOwnProperty('category')) { - obj['category'] = Category.constructFromObject(data['Category']); + obj['category'] = Category.constructFromObject(data['category']); } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); diff --git a/samples/client/petstore/javascript/test/ApiClientTest.js b/samples/client/petstore/javascript/test/ApiClientTest.js index c0f5c82c219..2674cf9e135 100755 --- a/samples/client/petstore/javascript/test/ApiClientTest.js +++ b/samples/client/petstore/javascript/test/ApiClientTest.js @@ -1,10 +1,10 @@ if (typeof module === 'object' && module.exports) { var expect = require('expect.js'); - var SwaggerPetstore = require('../src/index'); + var OpenAPIPetstore = require('../src/index'); var sinon = require('sinon'); } -var apiClient = SwaggerPetstore.ApiClient.instance; +var apiClient = OpenAPIPetstore.ApiClient.instance; describe('ApiClient', function() { describe('defaults', function() { @@ -45,7 +45,7 @@ describe('ApiClient', function() { }); it('should have correct default values with new API client and can customize it', function() { - var newClient = new SwaggerPetstore.ApiClient; + var newClient = new OpenAPIPetstore.ApiClient; expect(newClient.basePath).to.be('http://petstore.swagger.io:80/v2'); expect(newClient.buildUrl('/abc', {})).to.be('http://petstore.swagger.io:80/v2/abc'); @@ -143,7 +143,7 @@ describe('ApiClient', function() { sinon.stub(req, 'auth'); sinon.stub(req, 'set'); sinon.stub(req, 'query'); - newClient = new SwaggerPetstore.ApiClient(); + newClient = new OpenAPIPetstore.ApiClient(); }); describe('basic', function() { @@ -343,7 +343,7 @@ describe('ApiClient', function() { }); it('should put default headers in request', function() { - var newClient = new SwaggerPetstore.ApiClient; + var newClient = new OpenAPIPetstore.ApiClient; newClient.defaultHeaders['Content-Type'] = 'text/plain' newClient.defaultHeaders['api_key'] = 'special-key' @@ -355,7 +355,7 @@ describe('ApiClient', function() { }); it('should override default headers with provided header params', function() { - var newClient = new SwaggerPetstore.ApiClient; + var newClient = new OpenAPIPetstore.ApiClient; newClient.defaultHeaders['Content-Type'] = 'text/plain' newClient.defaultHeaders['api_key'] = 'special-key' diff --git a/samples/client/petstore/javascript/test/api/AnotherFakeApi.spec.js b/samples/client/petstore/javascript/test/api/AnotherFakeApi.spec.js index 593e828d3cd..8ab4cba4fa7 100644 --- a/samples/client/petstore/javascript/test/api/AnotherFakeApi.spec.js +++ b/samples/client/petstore/javascript/test/api/AnotherFakeApi.spec.js @@ -1,14 +1,13 @@ /** - * Swagger Petstore + * 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 - * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * - * Swagger Codegen version: 2.3.0-SNAPSHOT + * OpenAPI Generator version: 3.0.0-SNAPSHOT * * Do not edit the class manually. * @@ -23,15 +22,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenApiPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenApiPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.AnotherFakeApi(); + instance = new OpenApiPetstore.AnotherFakeApi(); }); var getProperty = function(object, getter, property) { diff --git a/samples/client/petstore/javascript/test/api/FakeApi.spec.js b/samples/client/petstore/javascript/test/api/FakeApi.spec.js index 9f22eb2c3c6..af78655426d 100644 --- a/samples/client/petstore/javascript/test/api/FakeApi.spec.js +++ b/samples/client/petstore/javascript/test/api/FakeApi.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.FakeApi(); + instance = new OpenAPIPetstore.FakeApi(); }); var getProperty = function(object, getter, property) { diff --git a/samples/client/petstore/javascript/test/api/FakeClassnameTags123Api.spec.js b/samples/client/petstore/javascript/test/api/FakeClassnameTags123Api.spec.js index 06504559511..8f25ee46450 100644 --- a/samples/client/petstore/javascript/test/api/FakeClassnameTags123Api.spec.js +++ b/samples/client/petstore/javascript/test/api/FakeClassnameTags123Api.spec.js @@ -1,14 +1,13 @@ /** - * Swagger Petstore + * 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 - * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * - * Swagger Codegen version: 2.3.0-SNAPSHOT + * OpenAPI Generator version: 3.0.0-SNAPSHOT * * Do not edit the class manually. * @@ -23,15 +22,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenApiPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenApiPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.FakeClassnameTags123Api(); + instance = new OpenApiPetstore.FakeClassnameTags123Api(); }); var getProperty = function(object, getter, property) { diff --git a/samples/client/petstore/javascript/test/api/PetApi.spec.js b/samples/client/petstore/javascript/test/api/PetApi.spec.js index 213660d8058..b133ad10229 100644 --- a/samples/client/petstore/javascript/test/api/PetApi.spec.js +++ b/samples/client/petstore/javascript/test/api/PetApi.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var api; beforeEach(function() { - api = new SwaggerPetstore.PetApi(); + api = new OpenAPIPetstore.PetApi(); }); var getProperty = function(object, getter, property) { @@ -36,11 +36,11 @@ var createRandomPet = function() { var id = new Date().getTime(); - var pet = new SwaggerPetstore.Pet(); + var pet = new OpenAPIPetstore.Pet(); setProperty(pet, "setId", "id", id); setProperty(pet, "setName", "name", "pet" + id); - var category = new SwaggerPetstore.Category(); + var category = new OpenAPIPetstore.Category(); setProperty(category, "setId", "id", id); setProperty(category, "setName", "name", "category" + id); setProperty(pet, "setCategory", "category", category); @@ -64,12 +64,12 @@ expect(response.ok).to.be(true); expect(response.get('Content-Type')).to.be('application/json'); - expect(fetched).to.be.a(SwaggerPetstore.Pet); + expect(fetched).to.be.a(OpenAPIPetstore.Pet); expect(fetched.id).to.be(pet.id); expect(getProperty(fetched, "getPhotoUrls", "photoUrls")) .to.eql(getProperty(pet, "getPhotoUrls", "photoUrls")); expect(getProperty(fetched, "getCategory", "category")) - .to.be.a(SwaggerPetstore.Category); + .to.be.a(OpenAPIPetstore.Category); expect(getProperty(getProperty(fetched, "getCategory", "category"), "getName", "name")) .to.be(getProperty(getProperty(pet, "getCategory", "category"), "getName", "name")); @@ -89,13 +89,13 @@ api.getPetByIdInObject(pet.id, function(error, fetched) { if (error) throw error; - expect(fetched).to.be.a(SwaggerPetstore.InlineResponse200); + expect(fetched).to.be.a(OpenAPIPetstore.InlineResponse200); expect(fetched.id).to.be(pet.id); expect(fetched.name).to.be(pet.name); var categoryObj = fetched.category; expect(categoryObj).to.be.a(Object); - expect(categoryObj).not.to.be.a(SwaggerPetstore.Category); + expect(categoryObj).not.to.be.a(OpenAPIPetstore.Category); expect(categoryObj.id) .to.be(getProperty(getProperty(pet, "getCategory", "category"), "getId", "id")); expect(categoryObj.name) diff --git a/samples/client/petstore/javascript/test/api/StoreApi.spec.js b/samples/client/petstore/javascript/test/api/StoreApi.spec.js index 65fb06b3fd0..26106984b7c 100644 --- a/samples/client/petstore/javascript/test/api/StoreApi.spec.js +++ b/samples/client/petstore/javascript/test/api/StoreApi.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var api; beforeEach(function() { - api = new SwaggerPetstore.StoreApi(); + api = new OpenAPIPetstore.StoreApi(); }); describe('StoreApi', function() { diff --git a/samples/client/petstore/javascript/test/api/UserApi.spec.js b/samples/client/petstore/javascript/test/api/UserApi.spec.js index e9b4bb93f90..a2ee25c9d91 100644 --- a/samples/client/petstore/javascript/test/api/UserApi.spec.js +++ b/samples/client/petstore/javascript/test/api/UserApi.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.UserApi(); + instance = new OpenAPIPetstore.UserApi(); }); var getProperty = function(object, getter, property) { diff --git a/samples/client/petstore/javascript/test/model/AdditionalPropertiesClass.spec.js b/samples/client/petstore/javascript/test/model/AdditionalPropertiesClass.spec.js index 9a900762435..a613a54ccc5 100644 --- a/samples/client/petstore/javascript/test/model/AdditionalPropertiesClass.spec.js +++ b/samples/client/petstore/javascript/test/model/AdditionalPropertiesClass.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.AdditionalPropertiesClass(); + instance = new OpenAPIPetstore.AdditionalPropertiesClass(); }); var getProperty = function(object, getter, property) { @@ -37,19 +37,19 @@ describe('AdditionalPropertiesClass', function() { it('should create an instance of AdditionalPropertiesClass', function() { // uncomment below and update the code to test AdditionalPropertiesClass - //var instane = new SwaggerPetstore.AdditionalPropertiesClass(); - //expect(instance).to.be.a(SwaggerPetstore.AdditionalPropertiesClass); + //var instane = new OpenAPIPetstore.AdditionalPropertiesClass(); + //expect(instance).to.be.a(OpenAPIPetstore.AdditionalPropertiesClass); }); it('should have the property mapProperty (base name: "map_property")', function() { // uncomment below and update the code to test the property mapProperty - //var instane = new SwaggerPetstore.AdditionalPropertiesClass(); + //var instane = new OpenAPIPetstore.AdditionalPropertiesClass(); //expect(instance).to.be(); }); it('should have the property mapOfMapProperty (base name: "map_of_map_property")', function() { // uncomment below and update the code to test the property mapOfMapProperty - //var instane = new SwaggerPetstore.AdditionalPropertiesClass(); + //var instane = new OpenAPIPetstore.AdditionalPropertiesClass(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/Animal.spec.js b/samples/client/petstore/javascript/test/model/Animal.spec.js index dfc86e612dc..217f1a2e29a 100644 --- a/samples/client/petstore/javascript/test/model/Animal.spec.js +++ b/samples/client/petstore/javascript/test/model/Animal.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.Animal(); + instance = new OpenAPIPetstore.Animal(); }); var getProperty = function(object, getter, property) { @@ -37,19 +37,19 @@ describe('Animal', function() { it('should create an instance of Animal', function() { // uncomment below and update the code to test Animal - //var instane = new SwaggerPetstore.Animal(); - //expect(instance).to.be.a(SwaggerPetstore.Animal); + //var instane = new OpenAPIPetstore.Animal(); + //expect(instance).to.be.a(OpenAPIPetstore.Animal); }); it('should have the property className (base name: "className")', function() { // uncomment below and update the code to test the property className - //var instane = new SwaggerPetstore.Animal(); + //var instane = new OpenAPIPetstore.Animal(); //expect(instance).to.be(); }); it('should have the property color (base name: "color")', function() { // uncomment below and update the code to test the property color - //var instane = new SwaggerPetstore.Animal(); + //var instane = new OpenAPIPetstore.Animal(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/AnimalFarm.spec.js b/samples/client/petstore/javascript/test/model/AnimalFarm.spec.js index 4cacc055dfa..a51cc374e7d 100644 --- a/samples/client/petstore/javascript/test/model/AnimalFarm.spec.js +++ b/samples/client/petstore/javascript/test/model/AnimalFarm.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.AnimalFarm(); + instance = new OpenAPIPetstore.AnimalFarm(); }); var getProperty = function(object, getter, property) { @@ -37,8 +37,8 @@ describe('AnimalFarm', function() { it('should create an instance of AnimalFarm', function() { // uncomment below and update the code to test AnimalFarm - //var instane = new SwaggerPetstore.AnimalFarm(); - //expect(instance).to.be.a(SwaggerPetstore.AnimalFarm); + //var instane = new OpenAPIPetstore.AnimalFarm(); + //expect(instance).to.be.a(OpenAPIPetstore.AnimalFarm); }); }); diff --git a/samples/client/petstore/javascript/test/model/ApiResponse.spec.js b/samples/client/petstore/javascript/test/model/ApiResponse.spec.js index 972649fe24e..0b17f974f2a 100644 --- a/samples/client/petstore/javascript/test/model/ApiResponse.spec.js +++ b/samples/client/petstore/javascript/test/model/ApiResponse.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.ApiResponse(); + instance = new OpenAPIPetstore.ApiResponse(); }); var getProperty = function(object, getter, property) { @@ -37,25 +37,25 @@ describe('ApiResponse', function() { it('should create an instance of ApiResponse', function() { // uncomment below and update the code to test ApiResponse - //var instane = new SwaggerPetstore.ApiResponse(); - //expect(instance).to.be.a(SwaggerPetstore.ApiResponse); + //var instane = new OpenAPIPetstore.ApiResponse(); + //expect(instance).to.be.a(OpenAPIPetstore.ApiResponse); }); it('should have the property code (base name: "code")', function() { // uncomment below and update the code to test the property code - //var instane = new SwaggerPetstore.ApiResponse(); + //var instane = new OpenAPIPetstore.ApiResponse(); //expect(instance).to.be(); }); it('should have the property type (base name: "type")', function() { // uncomment below and update the code to test the property type - //var instane = new SwaggerPetstore.ApiResponse(); + //var instane = new OpenAPIPetstore.ApiResponse(); //expect(instance).to.be(); }); it('should have the property message (base name: "message")', function() { // uncomment below and update the code to test the property message - //var instane = new SwaggerPetstore.ApiResponse(); + //var instane = new OpenAPIPetstore.ApiResponse(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/ArrayOfArrayOfNumberOnly.spec.js b/samples/client/petstore/javascript/test/model/ArrayOfArrayOfNumberOnly.spec.js index 98c97fb0c32..dfa03195718 100644 --- a/samples/client/petstore/javascript/test/model/ArrayOfArrayOfNumberOnly.spec.js +++ b/samples/client/petstore/javascript/test/model/ArrayOfArrayOfNumberOnly.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -31,15 +31,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.ArrayOfArrayOfNumberOnly(); + instance = new OpenAPIPetstore.ArrayOfArrayOfNumberOnly(); }); var getProperty = function(object, getter, property) { @@ -61,13 +61,13 @@ describe('ArrayOfArrayOfNumberOnly', function() { it('should create an instance of ArrayOfArrayOfNumberOnly', function() { // uncomment below and update the code to test ArrayOfArrayOfNumberOnly - //var instane = new SwaggerPetstore.ArrayOfArrayOfNumberOnly(); - //expect(instance).to.be.a(SwaggerPetstore.ArrayOfArrayOfNumberOnly); + //var instane = new OpenAPIPetstore.ArrayOfArrayOfNumberOnly(); + //expect(instance).to.be.a(OpenAPIPetstore.ArrayOfArrayOfNumberOnly); }); it('should have the property arrayArrayNumber (base name: "ArrayArrayNumber")', function() { // uncomment below and update the code to test the property arrayArrayNumber - //var instane = new SwaggerPetstore.ArrayOfArrayOfNumberOnly(); + //var instane = new OpenAPIPetstore.ArrayOfArrayOfNumberOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/ArrayOfNumberOnly.spec.js b/samples/client/petstore/javascript/test/model/ArrayOfNumberOnly.spec.js index e19fd12235e..6d49d01367f 100644 --- a/samples/client/petstore/javascript/test/model/ArrayOfNumberOnly.spec.js +++ b/samples/client/petstore/javascript/test/model/ArrayOfNumberOnly.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -31,15 +31,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.ArrayOfNumberOnly(); + instance = new OpenAPIPetstore.ArrayOfNumberOnly(); }); var getProperty = function(object, getter, property) { @@ -61,13 +61,13 @@ describe('ArrayOfNumberOnly', function() { it('should create an instance of ArrayOfNumberOnly', function() { // uncomment below and update the code to test ArrayOfNumberOnly - //var instane = new SwaggerPetstore.ArrayOfNumberOnly(); - //expect(instance).to.be.a(SwaggerPetstore.ArrayOfNumberOnly); + //var instane = new OpenAPIPetstore.ArrayOfNumberOnly(); + //expect(instance).to.be.a(OpenAPIPetstore.ArrayOfNumberOnly); }); it('should have the property arrayNumber (base name: "ArrayNumber")', function() { // uncomment below and update the code to test the property arrayNumber - //var instane = new SwaggerPetstore.ArrayOfNumberOnly(); + //var instane = new OpenAPIPetstore.ArrayOfNumberOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/ArrayTest.spec.js b/samples/client/petstore/javascript/test/model/ArrayTest.spec.js index 7bb512f1043..95301860bcb 100644 --- a/samples/client/petstore/javascript/test/model/ArrayTest.spec.js +++ b/samples/client/petstore/javascript/test/model/ArrayTest.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.ArrayTest(); + instance = new OpenAPIPetstore.ArrayTest(); }); var getProperty = function(object, getter, property) { @@ -37,25 +37,25 @@ describe('ArrayTest', function() { it('should create an instance of ArrayTest', function() { // uncomment below and update the code to test ArrayTest - //var instane = new SwaggerPetstore.ArrayTest(); - //expect(instance).to.be.a(SwaggerPetstore.ArrayTest); + //var instane = new OpenAPIPetstore.ArrayTest(); + //expect(instance).to.be.a(OpenAPIPetstore.ArrayTest); }); it('should have the property arrayOfString (base name: "array_of_string")', function() { // uncomment below and update the code to test the property arrayOfString - //var instane = new SwaggerPetstore.ArrayTest(); + //var instane = new OpenAPIPetstore.ArrayTest(); //expect(instance).to.be(); }); it('should have the property arrayArrayOfInteger (base name: "array_array_of_integer")', function() { // uncomment below and update the code to test the property arrayArrayOfInteger - //var instane = new SwaggerPetstore.ArrayTest(); + //var instane = new OpenAPIPetstore.ArrayTest(); //expect(instance).to.be(); }); it('should have the property arrayArrayOfModel (base name: "array_array_of_model")', function() { // uncomment below and update the code to test the property arrayArrayOfModel - //var instane = new SwaggerPetstore.ArrayTest(); + //var instane = new OpenAPIPetstore.ArrayTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/Capitalization.spec.js b/samples/client/petstore/javascript/test/model/Capitalization.spec.js index f1aa695c3fd..98c3045ce43 100644 --- a/samples/client/petstore/javascript/test/model/Capitalization.spec.js +++ b/samples/client/petstore/javascript/test/model/Capitalization.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -20,15 +20,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.Capitalization(); + instance = new OpenAPIPetstore.Capitalization(); }); var getProperty = function(object, getter, property) { @@ -50,43 +50,43 @@ describe('Capitalization', function() { it('should create an instance of Capitalization', function() { // uncomment below and update the code to test Capitalization - //var instane = new SwaggerPetstore.Capitalization(); - //expect(instance).to.be.a(SwaggerPetstore.Capitalization); + //var instane = new OpenAPIPetstore.Capitalization(); + //expect(instance).to.be.a(OpenAPIPetstore.Capitalization); }); it('should have the property smallCamel (base name: "smallCamel")', function() { // uncomment below and update the code to test the property smallCamel - //var instane = new SwaggerPetstore.Capitalization(); + //var instane = new OpenAPIPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property capitalCamel (base name: "CapitalCamel")', function() { // uncomment below and update the code to test the property capitalCamel - //var instane = new SwaggerPetstore.Capitalization(); + //var instane = new OpenAPIPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property smallSnake (base name: "small_Snake")', function() { // uncomment below and update the code to test the property smallSnake - //var instane = new SwaggerPetstore.Capitalization(); + //var instane = new OpenAPIPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property capitalSnake (base name: "Capital_Snake")', function() { // uncomment below and update the code to test the property capitalSnake - //var instane = new SwaggerPetstore.Capitalization(); + //var instane = new OpenAPIPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property sCAETHFlowPoints (base name: "SCA_ETH_Flow_Points")', function() { // uncomment below and update the code to test the property sCAETHFlowPoints - //var instane = new SwaggerPetstore.Capitalization(); + //var instane = new OpenAPIPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property ATT_NAME (base name: "ATT_NAME")', function() { // uncomment below and update the code to test the property ATT_NAME - //var instane = new SwaggerPetstore.Capitalization(); + //var instane = new OpenAPIPetstore.Capitalization(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/Cat.spec.js b/samples/client/petstore/javascript/test/model/Cat.spec.js index f2dcc4749fe..21b3bc7c40d 100644 --- a/samples/client/petstore/javascript/test/model/Cat.spec.js +++ b/samples/client/petstore/javascript/test/model/Cat.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.Cat(); + instance = new OpenAPIPetstore.Cat(); }); var getProperty = function(object, getter, property) { @@ -37,13 +37,13 @@ describe('Cat', function() { it('should create an instance of Cat', function() { // uncomment below and update the code to test Cat - //var instane = new SwaggerPetstore.Cat(); - //expect(instance).to.be.a(SwaggerPetstore.Cat); + //var instane = new OpenAPIPetstore.Cat(); + //expect(instance).to.be.a(OpenAPIPetstore.Cat); }); it('should have the property declawed (base name: "declawed")', function() { // uncomment below and update the code to test the property declawed - //var instane = new SwaggerPetstore.Cat(); + //var instane = new OpenAPIPetstore.Cat(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/Category.spec.js b/samples/client/petstore/javascript/test/model/Category.spec.js index 8f1167d8c2a..d1234150d84 100644 --- a/samples/client/petstore/javascript/test/model/Category.spec.js +++ b/samples/client/petstore/javascript/test/model/Category.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.Category(); + instance = new OpenAPIPetstore.Category(); }); var getProperty = function(object, getter, property) { @@ -37,19 +37,19 @@ describe('Category', function() { it('should create an instance of Category', function() { // uncomment below and update the code to test Category - //var instane = new SwaggerPetstore.Category(); - //expect(instance).to.be.a(SwaggerPetstore.Category); + //var instane = new OpenAPIPetstore.Category(); + //expect(instance).to.be.a(OpenAPIPetstore.Category); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new SwaggerPetstore.Category(); + //var instane = new OpenAPIPetstore.Category(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new SwaggerPetstore.Category(); + //var instane = new OpenAPIPetstore.Category(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/ClassModel.spec.js b/samples/client/petstore/javascript/test/model/ClassModel.spec.js index 5ee2e49a0de..b9f6ef4ce35 100644 --- a/samples/client/petstore/javascript/test/model/ClassModel.spec.js +++ b/samples/client/petstore/javascript/test/model/ClassModel.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -20,15 +20,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.ClassModel(); + instance = new OpenAPIPetstore.ClassModel(); }); var getProperty = function(object, getter, property) { @@ -50,13 +50,13 @@ describe('ClassModel', function() { it('should create an instance of ClassModel', function() { // uncomment below and update the code to test ClassModel - //var instane = new SwaggerPetstore.ClassModel(); - //expect(instance).to.be.a(SwaggerPetstore.ClassModel); + //var instane = new OpenAPIPetstore.ClassModel(); + //expect(instance).to.be.a(OpenAPIPetstore.ClassModel); }); it('should have the property _class (base name: "_class")', function() { // uncomment below and update the code to test the property _class - //var instane = new SwaggerPetstore.ClassModel(); + //var instane = new OpenAPIPetstore.ClassModel(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/Client.spec.js b/samples/client/petstore/javascript/test/model/Client.spec.js index 7bba630a29c..2fc7c85ba0c 100644 --- a/samples/client/petstore/javascript/test/model/Client.spec.js +++ b/samples/client/petstore/javascript/test/model/Client.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -31,15 +31,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.Client(); + instance = new OpenAPIPetstore.Client(); }); var getProperty = function(object, getter, property) { @@ -61,13 +61,13 @@ describe('Client', function() { it('should create an instance of Client', function() { // uncomment below and update the code to test Client - //var instane = new SwaggerPetstore.Client(); - //expect(instance).to.be.a(SwaggerPetstore.Client); + //var instane = new OpenAPIPetstore.Client(); + //expect(instance).to.be.a(OpenAPIPetstore.Client); }); it('should have the property client (base name: "client")', function() { // uncomment below and update the code to test the property client - //var instane = new SwaggerPetstore.Client(); + //var instane = new OpenAPIPetstore.Client(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/Dog.spec.js b/samples/client/petstore/javascript/test/model/Dog.spec.js index 292a803e7a4..423632a9c75 100644 --- a/samples/client/petstore/javascript/test/model/Dog.spec.js +++ b/samples/client/petstore/javascript/test/model/Dog.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.Dog(); + instance = new OpenAPIPetstore.Dog(); }); var getProperty = function(object, getter, property) { @@ -37,13 +37,13 @@ describe('Dog', function() { it('should create an instance of Dog', function() { // uncomment below and update the code to test Dog - //var instane = new SwaggerPetstore.Dog(); - //expect(instance).to.be.a(SwaggerPetstore.Dog); + //var instane = new OpenAPIPetstore.Dog(); + //expect(instance).to.be.a(OpenAPIPetstore.Dog); }); it('should have the property breed (base name: "breed")', function() { // uncomment below and update the code to test the property breed - //var instane = new SwaggerPetstore.Dog(); + //var instane = new OpenAPIPetstore.Dog(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/EnumArrays.spec.js b/samples/client/petstore/javascript/test/model/EnumArrays.spec.js index 2d26fb9920f..f41a5200955 100644 --- a/samples/client/petstore/javascript/test/model/EnumArrays.spec.js +++ b/samples/client/petstore/javascript/test/model/EnumArrays.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -31,15 +31,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.EnumArrays(); + instance = new OpenAPIPetstore.EnumArrays(); }); var getProperty = function(object, getter, property) { @@ -61,19 +61,19 @@ describe('EnumArrays', function() { it('should create an instance of EnumArrays', function() { // uncomment below and update the code to test EnumArrays - //var instane = new SwaggerPetstore.EnumArrays(); - //expect(instance).to.be.a(SwaggerPetstore.EnumArrays); + //var instane = new OpenAPIPetstore.EnumArrays(); + //expect(instance).to.be.a(OpenAPIPetstore.EnumArrays); }); it('should have the property justSymbol (base name: "just_symbol")', function() { // uncomment below and update the code to test the property justSymbol - //var instane = new SwaggerPetstore.EnumArrays(); + //var instane = new OpenAPIPetstore.EnumArrays(); //expect(instance).to.be(); }); it('should have the property arrayEnum (base name: "array_enum")', function() { // uncomment below and update the code to test the property arrayEnum - //var instane = new SwaggerPetstore.EnumArrays(); + //var instane = new OpenAPIPetstore.EnumArrays(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/EnumClass.spec.js b/samples/client/petstore/javascript/test/model/EnumClass.spec.js index dd95265d3ed..25b8aed6c3c 100644 --- a/samples/client/petstore/javascript/test/model/EnumClass.spec.js +++ b/samples/client/petstore/javascript/test/model/EnumClass.spec.js @@ -7,9 +7,9 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; @@ -36,8 +36,8 @@ describe('EnumClass', function() { it('should create an instance of EnumClass', function() { // uncomment below and update the code to test EnumClass - //var instane = new SwaggerPetstore.EnumClass(); - //expect(instance).to.be.a(SwaggerPetstore.EnumClass); + //var instane = new OpenAPIPetstore.EnumClass(); + //expect(instance).to.be.a(OpenAPIPetstore.EnumClass); }); }); diff --git a/samples/client/petstore/javascript/test/model/EnumTest.spec.js b/samples/client/petstore/javascript/test/model/EnumTest.spec.js index ec4841dc881..09e69747750 100644 --- a/samples/client/petstore/javascript/test/model/EnumTest.spec.js +++ b/samples/client/petstore/javascript/test/model/EnumTest.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.EnumTest(); + instance = new OpenAPIPetstore.EnumTest(); }); var getProperty = function(object, getter, property) { @@ -37,25 +37,25 @@ describe('EnumTest', function() { it('should create an instance of EnumTest', function() { // uncomment below and update the code to test EnumTest - //var instane = new SwaggerPetstore.EnumTest(); - //expect(instance).to.be.a(SwaggerPetstore.EnumTest); + //var instane = new OpenAPIPetstore.EnumTest(); + //expect(instance).to.be.a(OpenAPIPetstore.EnumTest); }); it('should have the property enumString (base name: "enum_string")', function() { // uncomment below and update the code to test the property enumString - //var instane = new SwaggerPetstore.EnumTest(); + //var instane = new OpenAPIPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property enumInteger (base name: "enum_integer")', function() { // uncomment below and update the code to test the property enumInteger - //var instane = new SwaggerPetstore.EnumTest(); + //var instane = new OpenAPIPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property enumNumber (base name: "enum_number")', function() { // uncomment below and update the code to test the property enumNumber - //var instane = new SwaggerPetstore.EnumTest(); + //var instane = new OpenAPIPetstore.EnumTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/FormatTest.spec.js b/samples/client/petstore/javascript/test/model/FormatTest.spec.js index 659d4ba46c2..e5fab4f063c 100644 --- a/samples/client/petstore/javascript/test/model/FormatTest.spec.js +++ b/samples/client/petstore/javascript/test/model/FormatTest.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.FormatTest(); + instance = new OpenAPIPetstore.FormatTest(); }); var getProperty = function(object, getter, property) { @@ -37,85 +37,85 @@ describe('FormatTest', function() { it('should create an instance of FormatTest', function() { // uncomment below and update the code to test FormatTest - //var instane = new SwaggerPetstore.FormatTest(); - //expect(instance).to.be.a(SwaggerPetstore.FormatTest); + //var instane = new OpenAPIPetstore.FormatTest(); + //expect(instance).to.be.a(OpenAPIPetstore.FormatTest); }); it('should have the property integer (base name: "integer")', function() { // uncomment below and update the code to test the property integer - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property int32 (base name: "int32")', function() { // uncomment below and update the code to test the property int32 - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property int64 (base name: "int64")', function() { // uncomment below and update the code to test the property int64 - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _number (base name: "number")', function() { // uncomment below and update the code to test the property _number - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _float (base name: "float")', function() { // uncomment below and update the code to test the property _float - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _double (base name: "double")', function() { // uncomment below and update the code to test the property _double - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _string (base name: "string")', function() { // uncomment below and update the code to test the property _string - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _byte (base name: "byte")', function() { // uncomment below and update the code to test the property _byte - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property binary (base name: "binary")', function() { // uncomment below and update the code to test the property binary - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _date (base name: "date")', function() { // uncomment below and update the code to test the property _date - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property dateTime (base name: "dateTime")', function() { // uncomment below and update the code to test the property dateTime - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property uuid (base name: "uuid")', function() { // uncomment below and update the code to test the property uuid - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property password (base name: "password")', function() { // uncomment below and update the code to test the property password - //var instane = new SwaggerPetstore.FormatTest(); + //var instane = new OpenAPIPetstore.FormatTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/HasOnlyReadOnly.spec.js b/samples/client/petstore/javascript/test/model/HasOnlyReadOnly.spec.js index 6e9d87fd4a5..425c1a83bf9 100644 --- a/samples/client/petstore/javascript/test/model/HasOnlyReadOnly.spec.js +++ b/samples/client/petstore/javascript/test/model/HasOnlyReadOnly.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -31,15 +31,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.HasOnlyReadOnly(); + instance = new OpenAPIPetstore.HasOnlyReadOnly(); }); var getProperty = function(object, getter, property) { @@ -61,19 +61,19 @@ describe('HasOnlyReadOnly', function() { it('should create an instance of HasOnlyReadOnly', function() { // uncomment below and update the code to test HasOnlyReadOnly - //var instane = new SwaggerPetstore.HasOnlyReadOnly(); - //expect(instance).to.be.a(SwaggerPetstore.HasOnlyReadOnly); + //var instane = new OpenAPIPetstore.HasOnlyReadOnly(); + //expect(instance).to.be.a(OpenAPIPetstore.HasOnlyReadOnly); }); it('should have the property bar (base name: "bar")', function() { // uncomment below and update the code to test the property bar - //var instane = new SwaggerPetstore.HasOnlyReadOnly(); + //var instane = new OpenAPIPetstore.HasOnlyReadOnly(); //expect(instance).to.be(); }); it('should have the property foo (base name: "foo")', function() { // uncomment below and update the code to test the property foo - //var instane = new SwaggerPetstore.HasOnlyReadOnly(); + //var instane = new OpenAPIPetstore.HasOnlyReadOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/List.spec.js b/samples/client/petstore/javascript/test/model/List.spec.js index e73583f9ebc..4f14dafc3aa 100644 --- a/samples/client/petstore/javascript/test/model/List.spec.js +++ b/samples/client/petstore/javascript/test/model/List.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -31,15 +31,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.List(); + instance = new OpenAPIPetstore.List(); }); var getProperty = function(object, getter, property) { @@ -61,13 +61,13 @@ describe('List', function() { it('should create an instance of List', function() { // uncomment below and update the code to test List - //var instane = new SwaggerPetstore.List(); - //expect(instance).to.be.a(SwaggerPetstore.List); + //var instane = new OpenAPIPetstore.List(); + //expect(instance).to.be.a(OpenAPIPetstore.List); }); it('should have the property _123List (base name: "123-list")', function() { // uncomment below and update the code to test the property _123List - //var instane = new SwaggerPetstore.List(); + //var instane = new OpenAPIPetstore.List(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/MapTest.spec.js b/samples/client/petstore/javascript/test/model/MapTest.spec.js index 4c91b24d01c..a7fa7442ae8 100644 --- a/samples/client/petstore/javascript/test/model/MapTest.spec.js +++ b/samples/client/petstore/javascript/test/model/MapTest.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -31,15 +31,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.MapTest(); + instance = new OpenAPIPetstore.MapTest(); }); var getProperty = function(object, getter, property) { @@ -61,25 +61,25 @@ describe('MapTest', function() { it('should create an instance of MapTest', function() { // uncomment below and update the code to test MapTest - //var instane = new SwaggerPetstore.MapTest(); - //expect(instance).to.be.a(SwaggerPetstore.MapTest); + //var instane = new OpenAPIPetstore.MapTest(); + //expect(instance).to.be.a(OpenAPIPetstore.MapTest); }); it('should have the property mapMapOfString (base name: "map_map_of_string")', function() { // uncomment below and update the code to test the property mapMapOfString - //var instane = new SwaggerPetstore.MapTest(); + //var instane = new OpenAPIPetstore.MapTest(); //expect(instance).to.be(); }); it('should have the property mapMapOfEnum (base name: "map_map_of_enum")', function() { // uncomment below and update the code to test the property mapMapOfEnum - //var instane = new SwaggerPetstore.MapTest(); + //var instane = new OpenAPIPetstore.MapTest(); //expect(instance).to.be(); }); it('should have the property mapOfEnumString (base name: "map_of_enum_string")', function() { // uncomment below and update the code to test the property mapOfEnumString - //var instane = new SwaggerPetstore.MapTest(); + //var instane = new OpenAPIPetstore.MapTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js b/samples/client/petstore/javascript/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js index 712ac334966..482e0574ef8 100644 --- a/samples/client/petstore/javascript/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js +++ b/samples/client/petstore/javascript/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + instance = new OpenAPIPetstore.MixedPropertiesAndAdditionalPropertiesClass(); }); var getProperty = function(object, getter, property) { @@ -37,25 +37,25 @@ describe('MixedPropertiesAndAdditionalPropertiesClass', function() { it('should create an instance of MixedPropertiesAndAdditionalPropertiesClass', function() { // uncomment below and update the code to test MixedPropertiesAndAdditionalPropertiesClass - //var instane = new SwaggerPetstore.MixedPropertiesAndAdditionalPropertiesClass(); - //expect(instance).to.be.a(SwaggerPetstore.MixedPropertiesAndAdditionalPropertiesClass); + //var instane = new OpenAPIPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //expect(instance).to.be.a(OpenAPIPetstore.MixedPropertiesAndAdditionalPropertiesClass); }); it('should have the property uuid (base name: "uuid")', function() { // uncomment below and update the code to test the property uuid - //var instane = new SwaggerPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //var instane = new OpenAPIPetstore.MixedPropertiesAndAdditionalPropertiesClass(); //expect(instance).to.be(); }); it('should have the property dateTime (base name: "dateTime")', function() { // uncomment below and update the code to test the property dateTime - //var instane = new SwaggerPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //var instane = new OpenAPIPetstore.MixedPropertiesAndAdditionalPropertiesClass(); //expect(instance).to.be(); }); it('should have the property map (base name: "map")', function() { // uncomment below and update the code to test the property map - //var instane = new SwaggerPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //var instane = new OpenAPIPetstore.MixedPropertiesAndAdditionalPropertiesClass(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/Model200Response.spec.js b/samples/client/petstore/javascript/test/model/Model200Response.spec.js index a7549135636..b6cc2685418 100644 --- a/samples/client/petstore/javascript/test/model/Model200Response.spec.js +++ b/samples/client/petstore/javascript/test/model/Model200Response.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.Model200Response(); + instance = new OpenAPIPetstore.Model200Response(); }); var getProperty = function(object, getter, property) { @@ -37,13 +37,13 @@ describe('Model200Response', function() { it('should create an instance of Model200Response', function() { // uncomment below and update the code to test Model200Response - //var instane = new SwaggerPetstore.Model200Response(); - //expect(instance).to.be.a(SwaggerPetstore.Model200Response); + //var instane = new OpenAPIPetstore.Model200Response(); + //expect(instance).to.be.a(OpenAPIPetstore.Model200Response); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new SwaggerPetstore.Model200Response(); + //var instane = new OpenAPIPetstore.Model200Response(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/ModelReturn.spec.js b/samples/client/petstore/javascript/test/model/ModelReturn.spec.js index f2cfd489138..667150af7f8 100644 --- a/samples/client/petstore/javascript/test/model/ModelReturn.spec.js +++ b/samples/client/petstore/javascript/test/model/ModelReturn.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.ModelReturn(); + instance = new OpenAPIPetstore.ModelReturn(); }); var getProperty = function(object, getter, property) { @@ -37,13 +37,13 @@ describe('ModelReturn', function() { it('should create an instance of ModelReturn', function() { // uncomment below and update the code to test ModelReturn - //var instane = new SwaggerPetstore.ModelReturn(); - //expect(instance).to.be.a(SwaggerPetstore.ModelReturn); + //var instane = new OpenAPIPetstore.ModelReturn(); + //expect(instance).to.be.a(OpenAPIPetstore.ModelReturn); }); it('should have the property _return (base name: "return")', function() { // uncomment below and update the code to test the property _return - //var instane = new SwaggerPetstore.ModelReturn(); + //var instane = new OpenAPIPetstore.ModelReturn(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/Name.spec.js b/samples/client/petstore/javascript/test/model/Name.spec.js index 13d85520601..aa1a9a104d7 100644 --- a/samples/client/petstore/javascript/test/model/Name.spec.js +++ b/samples/client/petstore/javascript/test/model/Name.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.Name(); + instance = new OpenAPIPetstore.Name(); }); var getProperty = function(object, getter, property) { @@ -37,31 +37,31 @@ describe('Name', function() { it('should create an instance of Name', function() { // uncomment below and update the code to test Name - //var instane = new SwaggerPetstore.Name(); - //expect(instance).to.be.a(SwaggerPetstore.Name); + //var instane = new OpenAPIPetstore.Name(); + //expect(instance).to.be.a(OpenAPIPetstore.Name); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new SwaggerPetstore.Name(); + //var instane = new OpenAPIPetstore.Name(); //expect(instance).to.be(); }); it('should have the property snakeCase (base name: "snake_case")', function() { // uncomment below and update the code to test the property snakeCase - //var instane = new SwaggerPetstore.Name(); + //var instane = new OpenAPIPetstore.Name(); //expect(instance).to.be(); }); it('should have the property property (base name: "property")', function() { // uncomment below and update the code to test the property property - //var instane = new SwaggerPetstore.Name(); + //var instane = new OpenAPIPetstore.Name(); //expect(instance).to.be(); }); it('should have the property _123Number (base name: "123Number")', function() { // uncomment below and update the code to test the property _123Number - //var instane = new SwaggerPetstore.Name(); + //var instane = new OpenAPIPetstore.Name(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/NumberOnly.spec.js b/samples/client/petstore/javascript/test/model/NumberOnly.spec.js index f8b8327a2ee..464f698ff87 100644 --- a/samples/client/petstore/javascript/test/model/NumberOnly.spec.js +++ b/samples/client/petstore/javascript/test/model/NumberOnly.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -31,15 +31,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.NumberOnly(); + instance = new OpenAPIPetstore.NumberOnly(); }); var getProperty = function(object, getter, property) { @@ -61,13 +61,13 @@ describe('NumberOnly', function() { it('should create an instance of NumberOnly', function() { // uncomment below and update the code to test NumberOnly - //var instane = new SwaggerPetstore.NumberOnly(); - //expect(instance).to.be.a(SwaggerPetstore.NumberOnly); + //var instane = new OpenAPIPetstore.NumberOnly(); + //expect(instance).to.be.a(OpenAPIPetstore.NumberOnly); }); it('should have the property justNumber (base name: "JustNumber")', function() { // uncomment below and update the code to test the property justNumber - //var instane = new SwaggerPetstore.NumberOnly(); + //var instane = new OpenAPIPetstore.NumberOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/Order.spec.js b/samples/client/petstore/javascript/test/model/Order.spec.js index 070690ef131..9e439ecd3b6 100644 --- a/samples/client/petstore/javascript/test/model/Order.spec.js +++ b/samples/client/petstore/javascript/test/model/Order.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.Order(); + instance = new OpenAPIPetstore.Order(); }); var getProperty = function(object, getter, property) { @@ -37,43 +37,43 @@ describe('Order', function() { it('should create an instance of Order', function() { // uncomment below and update the code to test Order - //var instane = new SwaggerPetstore.Order(); - //expect(instance).to.be.a(SwaggerPetstore.Order); + //var instane = new OpenAPIPetstore.Order(); + //expect(instance).to.be.a(OpenAPIPetstore.Order); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new SwaggerPetstore.Order(); + //var instane = new OpenAPIPetstore.Order(); //expect(instance).to.be(); }); it('should have the property petId (base name: "petId")', function() { // uncomment below and update the code to test the property petId - //var instane = new SwaggerPetstore.Order(); + //var instane = new OpenAPIPetstore.Order(); //expect(instance).to.be(); }); it('should have the property quantity (base name: "quantity")', function() { // uncomment below and update the code to test the property quantity - //var instane = new SwaggerPetstore.Order(); + //var instane = new OpenAPIPetstore.Order(); //expect(instance).to.be(); }); it('should have the property shipDate (base name: "shipDate")', function() { // uncomment below and update the code to test the property shipDate - //var instane = new SwaggerPetstore.Order(); + //var instane = new OpenAPIPetstore.Order(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new SwaggerPetstore.Order(); + //var instane = new OpenAPIPetstore.Order(); //expect(instance).to.be(); }); it('should have the property complete (base name: "complete")', function() { // uncomment below and update the code to test the property complete - //var instane = new SwaggerPetstore.Order(); + //var instane = new OpenAPIPetstore.Order(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/OuterComposite.spec.js b/samples/client/petstore/javascript/test/model/OuterComposite.spec.js index 6fd830b7c0e..350c938c723 100644 --- a/samples/client/petstore/javascript/test/model/OuterComposite.spec.js +++ b/samples/client/petstore/javascript/test/model/OuterComposite.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -20,15 +20,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.OuterComposite(); + instance = new OpenAPIPetstore.OuterComposite(); }); var getProperty = function(object, getter, property) { @@ -50,25 +50,25 @@ describe('OuterComposite', function() { it('should create an instance of OuterComposite', function() { // uncomment below and update the code to test OuterComposite - //var instane = new SwaggerPetstore.OuterComposite(); - //expect(instance).to.be.a(SwaggerPetstore.OuterComposite); + //var instane = new OpenAPIPetstore.OuterComposite(); + //expect(instance).to.be.a(OpenAPIPetstore.OuterComposite); }); it('should have the property myNumber (base name: "my_number")', function() { // uncomment below and update the code to test the property myNumber - //var instane = new SwaggerPetstore.OuterComposite(); + //var instane = new OpenAPIPetstore.OuterComposite(); //expect(instance).to.be(); }); it('should have the property myString (base name: "my_string")', function() { // uncomment below and update the code to test the property myString - //var instane = new SwaggerPetstore.OuterComposite(); + //var instane = new OpenAPIPetstore.OuterComposite(); //expect(instance).to.be(); }); it('should have the property myBoolean (base name: "my_boolean")', function() { // uncomment below and update the code to test the property myBoolean - //var instane = new SwaggerPetstore.OuterComposite(); + //var instane = new OpenAPIPetstore.OuterComposite(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/OuterEnum.spec.js b/samples/client/petstore/javascript/test/model/OuterEnum.spec.js index 14c26a3aef5..076073fb7f1 100644 --- a/samples/client/petstore/javascript/test/model/OuterEnum.spec.js +++ b/samples/client/petstore/javascript/test/model/OuterEnum.spec.js @@ -1,5 +1,5 @@ /** - * Swagger Petstore + * 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 @@ -20,9 +20,9 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; @@ -49,8 +49,8 @@ describe('OuterEnum', function() { it('should create an instance of OuterEnum', function() { // uncomment below and update the code to test OuterEnum - //var instane = new SwaggerPetstore.OuterEnum(); - //expect(instance).to.be.a(SwaggerPetstore.OuterEnum); + //var instane = new OpenAPIPetstore.OuterEnum(); + //expect(instance).to.be.a(OpenAPIPetstore.OuterEnum); }); }); diff --git a/samples/client/petstore/javascript/test/model/Pet.spec.js b/samples/client/petstore/javascript/test/model/Pet.spec.js index ac66031152d..84bccde4ee3 100644 --- a/samples/client/petstore/javascript/test/model/Pet.spec.js +++ b/samples/client/petstore/javascript/test/model/Pet.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.Pet(); + instance = new OpenAPIPetstore.Pet(); }); var getProperty = function(object, getter, property) { @@ -37,43 +37,43 @@ describe('Pet', function() { it('should create an instance of Pet', function() { // uncomment below and update the code to test Pet - //var instane = new SwaggerPetstore.Pet(); - //expect(instance).to.be.a(SwaggerPetstore.Pet); + //var instane = new OpenAPIPetstore.Pet(); + //expect(instance).to.be.a(OpenAPIPetstore.Pet); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new SwaggerPetstore.Pet(); + //var instane = new OpenAPIPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property category (base name: "category")', function() { // uncomment below and update the code to test the property category - //var instane = new SwaggerPetstore.Pet(); + //var instane = new OpenAPIPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new SwaggerPetstore.Pet(); + //var instane = new OpenAPIPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property photoUrls (base name: "photoUrls")', function() { // uncomment below and update the code to test the property photoUrls - //var instane = new SwaggerPetstore.Pet(); + //var instane = new OpenAPIPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property tags (base name: "tags")', function() { // uncomment below and update the code to test the property tags - //var instane = new SwaggerPetstore.Pet(); + //var instane = new OpenAPIPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new SwaggerPetstore.Pet(); + //var instane = new OpenAPIPetstore.Pet(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/ReadOnlyFirst.spec.js b/samples/client/petstore/javascript/test/model/ReadOnlyFirst.spec.js index 1af5ea146b3..a26552ce325 100644 --- a/samples/client/petstore/javascript/test/model/ReadOnlyFirst.spec.js +++ b/samples/client/petstore/javascript/test/model/ReadOnlyFirst.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.ReadOnlyFirst(); + instance = new OpenAPIPetstore.ReadOnlyFirst(); }); var getProperty = function(object, getter, property) { @@ -37,19 +37,19 @@ describe('ReadOnlyFirst', function() { it('should create an instance of ReadOnlyFirst', function() { // uncomment below and update the code to test ReadOnlyFirst - //var instane = new SwaggerPetstore.ReadOnlyFirst(); - //expect(instance).to.be.a(SwaggerPetstore.ReadOnlyFirst); + //var instane = new OpenAPIPetstore.ReadOnlyFirst(); + //expect(instance).to.be.a(OpenAPIPetstore.ReadOnlyFirst); }); it('should have the property bar (base name: "bar")', function() { // uncomment below and update the code to test the property bar - //var instane = new SwaggerPetstore.ReadOnlyFirst(); + //var instane = new OpenAPIPetstore.ReadOnlyFirst(); //expect(instance).to.be(); }); it('should have the property baz (base name: "baz")', function() { // uncomment below and update the code to test the property baz - //var instane = new SwaggerPetstore.ReadOnlyFirst(); + //var instane = new OpenAPIPetstore.ReadOnlyFirst(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/SpecialModelName.spec.js b/samples/client/petstore/javascript/test/model/SpecialModelName.spec.js index 8255ae7a8f5..487bb632c3d 100644 --- a/samples/client/petstore/javascript/test/model/SpecialModelName.spec.js +++ b/samples/client/petstore/javascript/test/model/SpecialModelName.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.SpecialModelName(); + instance = new OpenAPIPetstore.SpecialModelName(); }); var getProperty = function(object, getter, property) { @@ -37,13 +37,13 @@ describe('SpecialModelName', function() { it('should create an instance of SpecialModelName', function() { // uncomment below and update the code to test SpecialModelName - //var instane = new SwaggerPetstore.SpecialModelName(); - //expect(instance).to.be.a(SwaggerPetstore.SpecialModelName); + //var instane = new OpenAPIPetstore.SpecialModelName(); + //expect(instance).to.be.a(OpenAPIPetstore.SpecialModelName); }); it('should have the property specialPropertyName (base name: "$special[property.name]")', function() { // uncomment below and update the code to test the property specialPropertyName - //var instane = new SwaggerPetstore.SpecialModelName(); + //var instane = new OpenAPIPetstore.SpecialModelName(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/Tag.spec.js b/samples/client/petstore/javascript/test/model/Tag.spec.js index 1a33f7fb9f1..be8aad11e40 100644 --- a/samples/client/petstore/javascript/test/model/Tag.spec.js +++ b/samples/client/petstore/javascript/test/model/Tag.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.Tag(); + instance = new OpenAPIPetstore.Tag(); }); var getProperty = function(object, getter, property) { @@ -37,19 +37,19 @@ describe('Tag', function() { it('should create an instance of Tag', function() { // uncomment below and update the code to test Tag - //var instane = new SwaggerPetstore.Tag(); - //expect(instance).to.be.a(SwaggerPetstore.Tag); + //var instane = new OpenAPIPetstore.Tag(); + //expect(instance).to.be.a(OpenAPIPetstore.Tag); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new SwaggerPetstore.Tag(); + //var instane = new OpenAPIPetstore.Tag(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new SwaggerPetstore.Tag(); + //var instane = new OpenAPIPetstore.Tag(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript/test/model/User.spec.js b/samples/client/petstore/javascript/test/model/User.spec.js index 5c0e3dfc826..f259ade2119 100644 --- a/samples/client/petstore/javascript/test/model/User.spec.js +++ b/samples/client/petstore/javascript/test/model/User.spec.js @@ -7,15 +7,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.SwaggerPetstore); + factory(root.expect, root.OpenAPIPetstore); } -}(this, function(expect, SwaggerPetstore) { +}(this, function(expect, OpenAPIPetstore) { 'use strict'; var instance; beforeEach(function() { - instance = new SwaggerPetstore.User(); + instance = new OpenAPIPetstore.User(); }); var getProperty = function(object, getter, property) { @@ -37,55 +37,55 @@ describe('User', function() { it('should create an instance of User', function() { // uncomment below and update the code to test User - //var instane = new SwaggerPetstore.User(); - //expect(instance).to.be.a(SwaggerPetstore.User); + //var instane = new OpenAPIPetstore.User(); + //expect(instance).to.be.a(OpenAPIPetstore.User); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new SwaggerPetstore.User(); + //var instane = new OpenAPIPetstore.User(); //expect(instance).to.be(); }); it('should have the property username (base name: "username")', function() { // uncomment below and update the code to test the property username - //var instane = new SwaggerPetstore.User(); + //var instane = new OpenAPIPetstore.User(); //expect(instance).to.be(); }); it('should have the property firstName (base name: "firstName")', function() { // uncomment below and update the code to test the property firstName - //var instane = new SwaggerPetstore.User(); + //var instane = new OpenAPIPetstore.User(); //expect(instance).to.be(); }); it('should have the property lastName (base name: "lastName")', function() { // uncomment below and update the code to test the property lastName - //var instane = new SwaggerPetstore.User(); + //var instane = new OpenAPIPetstore.User(); //expect(instance).to.be(); }); it('should have the property email (base name: "email")', function() { // uncomment below and update the code to test the property email - //var instane = new SwaggerPetstore.User(); + //var instane = new OpenAPIPetstore.User(); //expect(instance).to.be(); }); it('should have the property password (base name: "password")', function() { // uncomment below and update the code to test the property password - //var instane = new SwaggerPetstore.User(); + //var instane = new OpenAPIPetstore.User(); //expect(instance).to.be(); }); it('should have the property phone (base name: "phone")', function() { // uncomment below and update the code to test the property phone - //var instane = new SwaggerPetstore.User(); + //var instane = new OpenAPIPetstore.User(); //expect(instance).to.be(); }); it('should have the property userStatus (base name: "userStatus")', function() { // uncomment below and update the code to test the property userStatus - //var instane = new SwaggerPetstore.User(); + //var instane = new OpenAPIPetstore.User(); //expect(instance).to.be(); }); -- GitLab From 065c96681422911e75315a00287982aaa0e4fcd1 Mon Sep 17 00:00:00 2001 From: wing328 <wing328hk@gmail.com> Date: Sun, 13 May 2018 01:35:42 +0800 Subject: [PATCH 2/2] re-enable JS test --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9fbdaac3fe1..6e0687016cd 100644 --- a/pom.xml +++ b/pom.xml @@ -857,7 +857,7 @@ <module>samples/openapi3/client/petstore/php/OpenAPIClient-php</module> <module>samples/client/petstore/scala</module> <module>samples/client/petstore/akka-scala</module> - <!--<module>samples/client/petstore/javascript</module>--> + <module>samples/client/petstore/javascript</module> <module>samples/client/petstore/python</module> <module>samples/client/petstore/python-tornado</module> <module>samples/client/petstore/python-asyncio</module> -- GitLab