diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index 003b3032c6..2c1f1c28a3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -258,38 +258,6 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig { //writeOptional(outputFolder, new SupportingFile("base_object_spec.mustache", specFolder, "base_object_spec.rb")); } - /* TO BE DELETED: replaced with postProcessOperations below - @Override - public CodegenOperation fromOperation(String path, String httpMethod, Operation operation, Map schemas, OpenAPI openAPI) { - CodegenOperation op = super.fromOperation(path, httpMethod, operation, schemas, openAPI); - // Set vendor-extension to be used in template: - // x-codegen-hasMoreRequired - // x-codegen-hasMoreOptional - // x-codegen-hasRequiredParams - CodegenParameter lastRequired = null; - CodegenParameter lastOptional = null; - for (CodegenParameter p : op.allParams) { - if (p.required) { - lastRequired = p; - } else { - lastOptional = p; - } - } - for (CodegenParameter p : op.allParams) { - if (p == lastRequired) { - p.vendorExtensions.put("x-codegen-hasMoreRequired", false); - } else if (p == lastOptional) { - p.vendorExtensions.put("x-codegen-hasMoreOptional", false); - } else { - p.vendorExtensions.put("x-codegen-hasMoreRequired", true); - p.vendorExtensions.put("x-codegen-hasMoreOptional", true); - } - } - op.vendorExtensions.put("x-codegen-hasRequiredParams", lastRequired != null); - return op; - } - */ - @Override public CodegenType getTag() { return CodegenType.CLIENT; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java index 231d5ab1a1..6bfac618f4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java @@ -168,32 +168,6 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi //path is an unescaped variable in the mustache template api.mustache line 82 '<&path>' op.path = sanitizePath(op.path); - - // Set vendor-extension to be used in template: - // x-codegen-hasMoreRequired - // x-codegen-hasMoreOptional - // x-codegen-hasRequiredParams - CodegenParameter lastRequired = null; - CodegenParameter lastOptional = null; - for (CodegenParameter p : op.allParams) { - if (p.required) { - lastRequired = p; - } else { - lastOptional = p; - } - } - for (CodegenParameter p : op.allParams) { - if (p == lastRequired) { - p.vendorExtensions.put("x-codegen-hasMoreRequired", false); - } else if (p == lastOptional) { - p.vendorExtensions.put("x-codegen-hasMoreOptional", false); - } else { - p.vendorExtensions.put("x-codegen-hasMoreRequired", true); - p.vendorExtensions.put("x-codegen-hasMoreOptional", true); - } - } - op.vendorExtensions.put("x-codegen-hasRequiredParams", lastRequired != null); - op.vendorExtensions.put("x-codegen-httpMethodUpperCase", httpMethod.toUpperCase()); return op; diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_js.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_js.mustache index 6e50faa6a8..362400aaaa 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_js.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_js.mustache @@ -18,14 +18,21 @@ var {{{name}}} = defaultClient.authentications['{{{name}}}']; {{/hasAuthMethods}} var api = new {{{jsModuleName}}}.{{{classname}}}(){{#hasParams}} -{{#vendorExtensions.x-codegen-hasRequiredParams}}{{#allParams}}{{#required}} +{{#hasRequiredParams}} +{{#requiredParams}} var {{{paramName}}} = {{{example}}}; // {{=< >=}}{<&dataType>}<={{ }}=> {{{unescapedDescription}}} -{{/required}}{{/allParams}}{{/vendorExtensions.x-codegen-hasRequiredParams}}{{#hasOptionalParams}} -var opts = { {{#allParams}}{{^required}} - '{{{paramName}}}': {{{example}}}{{#vendorExtensions.x-codegen-hasMoreOptional}},{{/vendorExtensions.x-codegen-hasMoreOptional}} // {{=< >=}}{<&dataType>}<={{ }}=> {{{unescapedDescription}}}{{/required}}{{/allParams}} -};{{/hasOptionalParams}}{{/hasParams}} +{{/requiredParams}} +{{/hasRequiredParams}} +{{#hasOptionalParams}} +var opts = { + {{#optionalParams}} + '{{{paramName}}}': {{{example}}}{{#hasMore}},{{/hasMore}} // {{=< >=}}{<&dataType>}<={{ }}=> {{{unescapedDescription}}} + {{/optionalParams}} +}; +{{/hasOptionalParams}} +{{/hasParams}} {{#usePromises}} -api.{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{#vendorExtensions.x-codegen-hasMoreRequired}}, {{/vendorExtensions.x-codegen-hasMoreRequired}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{{#vendorExtensions.x-codegen-hasRequiredParams}}, {{/vendorExtensions.x-codegen-hasRequiredParams}}opts{{/hasOptionalParams}}).then(function({{#returnType}}data{{/returnType}}) { +api.{{{operationId}}}({{#requiredParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasOptionalParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/hasOptionalParams}}).then(function({{#returnType}}data{{/returnType}}) { {{#returnType}}console.log('API called successfully. Returned data: ' + data);{{/returnType}}{{^returnType}}console.log('API called successfully.');{{/returnType}} }, function(error) { console.error(error); @@ -39,5 +46,5 @@ var callback = function(error, data, response) { {{#returnType}}console.log('API called successfully. Returned data: ' + data);{{/returnType}}{{^returnType}}console.log('API called successfully.');{{/returnType}} } }; -api.{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{#vendorExtensions.x-codegen-hasMoreRequired}}, {{/vendorExtensions.x-codegen-hasMoreRequired}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{{#vendorExtensions.x-codegen-hasRequiredParams}}, {{/vendorExtensions.x-codegen-hasRequiredParams}}opts{{/hasOptionalParams}}{{#hasParams}}, {{/hasParams}}callback); +api.{{{operationId}}}({{#requiredParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasOptionalParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/hasOptionalParams}}{{#hasParams}}, {{/hasParams}}callback); {{/usePromises}} diff --git a/modules/openapi-generator/src/main/resources/ruby/README.mustache b/modules/openapi-generator/src/main/resources/ruby/README.mustache index 906035c789..0b3cbf9463 100644 --- a/modules/openapi-generator/src/main/resources/ruby/README.mustache +++ b/modules/openapi-generator/src/main/resources/ruby/README.mustache @@ -92,7 +92,7 @@ opts = { begin {{#summary}} #{{{.}}} -{{/summary}} {{#returnType}}result = {{/returnType}}api_instance.{{{operationId}}}{{#hasParams}}({{#allParams}}{{#required}}{{{paramName}}}{{#vendorExtensions.x-codegen-hasMoreRequired}}, {{/vendorExtensions.x-codegen-hasMoreRequired}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{{#vendorExtensions.x-codegen-hasRequiredParams}}, {{/vendorExtensions.x-codegen-hasRequiredParams}}opts{{/hasOptionalParams}}){{/hasParams}}{{#returnType}} +{{/summary}} {{#returnType}}result = {{/returnType}}api_instance.{{{operationId}}}{{#hasParams}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}){{/hasParams}}{{#returnType}} p result{{/returnType}} rescue {{{moduleName}}}::ApiError => e puts "Exception when calling {{classname}}->{{{operationId}}}: #{e}" diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 4b360b0042..aa21adb855 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -78,6 +78,7 @@ Class | Method | HTTP request | Description *Petstore::FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite | *Petstore::FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | *Petstore::FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | +*Petstore::FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *Petstore::FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *Petstore::FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *Petstore::FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters @@ -115,7 +116,6 @@ Class | Method | HTTP request | Description - [Petstore::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Petstore::ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Petstore::ArrayTest](docs/ArrayTest.md) - - [Petstore::Body4](docs/Body4.md) - [Petstore::Capitalization](docs/Capitalization.md) - [Petstore::Cat](docs/Cat.md) - [Petstore::Category](docs/Category.md) diff --git a/samples/client/petstore/ruby/docs/AnotherFakeApi.md b/samples/client/petstore/ruby/docs/AnotherFakeApi.md index 8163b2b49d..da2d5ff0b1 100644 --- a/samples/client/petstore/ruby/docs/AnotherFakeApi.md +++ b/samples/client/petstore/ruby/docs/AnotherFakeApi.md @@ -47,7 +47,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json diff --git a/samples/client/petstore/ruby/docs/FakeApi.md b/samples/client/petstore/ruby/docs/FakeApi.md index 3395ff2b34..f56974b127 100644 --- a/samples/client/petstore/ruby/docs/FakeApi.md +++ b/samples/client/petstore/ruby/docs/FakeApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite | [**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | [**fake_outer_string_serialize**](FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | +[**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters @@ -29,7 +30,7 @@ require 'petstore' api_instance = Petstore::FakeApi.new opts = { - body: true # BOOLEAN | Input boolean as post body + boolean_post_body: true # BOOLEAN | Input boolean as post body } begin @@ -44,7 +45,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **BOOLEAN**| Input boolean as post body | [optional] + **boolean_post_body** | **BOOLEAN**| Input boolean as post body | [optional] ### Return type @@ -56,7 +57,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: */* @@ -102,7 +103,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: */* @@ -148,7 +149,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: */* @@ -194,11 +195,54 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: */* +# **test_body_with_query_params** +> test_body_with_query_params(query, user) + + + +### Example +```ruby +# load the gem +require 'petstore' + +api_instance = Petstore::FakeApi.new +query = 'query_example' # String | +user = Petstore::User.new # User | + +begin + api_instance.test_body_with_query_params(query, user) +rescue Petstore::ApiError => e + puts "Exception when calling FakeApi->test_body_with_query_params: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String**| | + **user** | [**User**](User.md)| | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + + # **test_client_model** > Client test_client_model(client) @@ -239,7 +283,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json @@ -337,11 +381,11 @@ require 'petstore' api_instance = Petstore::FakeApi.new opts = { enum_header_string_array: ['enum_header_string_array_example'], # Array | Header parameter enum test (string array) - enum_header_string: 'enum_header_string_example', # String | Header parameter enum test (string) + enum_header_string: '-efg', # String | Header parameter enum test (string) enum_query_string_array: ['enum_query_string_array_example'], # Array | Query parameter enum test (string array) - enum_query_string: 'enum_query_string_example', # String | Query parameter enum test (string) + enum_query_string: '-efg', # String | Query parameter enum test (string) enum_query_integer: 56, # Integer | Query parameter enum test (double) - enum_query_double: 1.2, # Float | Query parameter enum test (double) + enum_query_double: 3.4, # Float | Query parameter enum test (double) enum_form_string_array: nil, # Array | Form parameter enum test (string array) enum_form_string: 'enum_form_string_example' # String | Form parameter enum test (string) } @@ -359,9 +403,9 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **enum_header_string_array** | [**Array<String>**](String.md)| Header parameter enum test (string array) | [optional] - **enum_header_string** | **String**| Header parameter enum test (string) | [optional] + **enum_header_string** | **String**| Header parameter enum test (string) | [optional] [default to -efg] **enum_query_string_array** | [**Array<String>**](String.md)| Query parameter enum test (string array) | [optional] - **enum_query_string** | **String**| Query parameter enum test (string) | [optional] + **enum_query_string** | **String**| Query parameter enum test (string) | [optional] [default to -efg] **enum_query_integer** | **Integer**| Query parameter enum test (double) | [optional] **enum_query_double** | **Float**| Query parameter enum test (double) | [optional] **enum_form_string_array** | [**Array<String>**](Array.md)| Form parameter enum test (string array) | [optional] @@ -383,7 +427,7 @@ No authorization required # **test_inline_additional_properties** -> test_inline_additional_properties(unknown_base_type) +> test_inline_additional_properties(request_body) test inline additionalProperties @@ -393,11 +437,11 @@ test inline additionalProperties require 'petstore' api_instance = Petstore::FakeApi.new -unknown_base_type = Petstore::UNKNOWN_BASE_TYPE.new # Hash | request body +request_body = {'key' => 'request_body_example'} # String | request body begin #test inline additionalProperties - api_instance.test_inline_additional_properties(unknown_base_type) + api_instance.test_inline_additional_properties(request_body) rescue Petstore::ApiError => e puts "Exception when calling FakeApi->test_inline_additional_properties: #{e}" end @@ -407,7 +451,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **unknown_base_type** | [**Hash<String, String>**](UNKNOWN_BASE_TYPE.md)| request body | + **request_body** | [**String**](String.md)| request body | ### Return type @@ -425,7 +469,7 @@ No authorization required # **test_json_form_data** -> test_json_form_data(opts) +> test_json_form_data(param, param2) test json serialization of form data @@ -435,13 +479,12 @@ test json serialization of form data require 'petstore' api_instance = Petstore::FakeApi.new -opts = { - body4: Petstore::Body4.new # Body4 | -} +param = 'param_example' # String | field1 +param2 = 'param2_example' # String | field2 begin #test json serialization of form data - api_instance.test_json_form_data(opts) + api_instance.test_json_form_data(param, param2) rescue Petstore::ApiError => e puts "Exception when calling FakeApi->test_json_form_data: #{e}" end @@ -451,7 +494,8 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body4** | [**Body4**](Body4.md)| | [optional] + **param** | **String**| field1 | + **param2** | **String**| field2 | ### Return type @@ -463,7 +507,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined diff --git a/samples/client/petstore/ruby/docs/FakeClassnameTags123Api.md b/samples/client/petstore/ruby/docs/FakeClassnameTags123Api.md index 884a359c06..a6153f0292 100644 --- a/samples/client/petstore/ruby/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/ruby/docs/FakeClassnameTags123Api.md @@ -54,7 +54,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json diff --git a/samples/client/petstore/ruby/docs/PetApi.md b/samples/client/petstore/ruby/docs/PetApi.md index d806da3b07..d64b1b8dc2 100644 --- a/samples/client/petstore/ruby/docs/PetApi.md +++ b/samples/client/petstore/ruby/docs/PetApi.md @@ -56,7 +56,7 @@ nil (empty response body) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json, application/xml - **Accept**: Not defined @@ -77,7 +77,7 @@ Petstore.configure do |config| end api_instance = Petstore::PetApi.new -pet_id = 789 # Integer | Pet id to delete +pet_id = 56 # Integer | Pet id to delete opts = { api_key: 'api_key_example' # String | } @@ -232,7 +232,7 @@ Petstore.configure do |config| end api_instance = Petstore::PetApi.new -pet_id = 789 # Integer | ID of pet to return +pet_id = 56 # Integer | ID of pet to return begin #Find pet by ID @@ -306,7 +306,7 @@ nil (empty response body) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json, application/xml - **Accept**: Not defined @@ -327,7 +327,7 @@ Petstore.configure do |config| end api_instance = Petstore::PetApi.new -pet_id = 789 # Integer | ID of pet that needs to be updated +pet_id = 56 # Integer | ID of pet that needs to be updated opts = { name: 'name_example', # String | Updated name of the pet status: 'status_example' # String | Updated status of the pet @@ -380,7 +380,7 @@ Petstore.configure do |config| end api_instance = Petstore::PetApi.new -pet_id = 789 # Integer | ID of pet to update +pet_id = 56 # Integer | ID of pet to update opts = { additional_metadata: 'additional_metadata_example', # String | Additional data to pass to server file: File.new('/path/to/file') # File | file to upload diff --git a/samples/client/petstore/ruby/docs/StoreApi.md b/samples/client/petstore/ruby/docs/StoreApi.md index db87e05b34..2ebdc4ddc0 100644 --- a/samples/client/petstore/ruby/docs/StoreApi.md +++ b/samples/client/petstore/ruby/docs/StoreApi.md @@ -115,7 +115,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge require 'petstore' api_instance = Petstore::StoreApi.new -order_id = 789 # Integer | ID of pet that needs to be fetched +order_id = 56 # Integer | ID of pet that needs to be fetched begin #Find purchase order by ID @@ -185,7 +185,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/xml, application/json diff --git a/samples/client/petstore/ruby/docs/UserApi.md b/samples/client/petstore/ruby/docs/UserApi.md index 94d9fdd285..ae8f3fad0f 100644 --- a/samples/client/petstore/ruby/docs/UserApi.md +++ b/samples/client/petstore/ruby/docs/UserApi.md @@ -53,7 +53,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: Not defined @@ -69,7 +69,7 @@ Creates list of users with given input array require 'petstore' api_instance = Petstore::UserApi.new -user = [Petstore::User.new] # Array | List of user object +user = nil # Array | List of user object begin #Creates list of users with given input array @@ -83,7 +83,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**Array<User>**](User.md)| List of user object | + **user** | [**Array<User>**](Array.md)| List of user object | ### Return type @@ -111,7 +111,7 @@ Creates list of users with given input array require 'petstore' api_instance = Petstore::UserApi.new -user = [Petstore::User.new] # Array | List of user object +user = nil # Array | List of user object begin #Creates list of users with given input array @@ -125,7 +125,7 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**Array<User>**](User.md)| List of user object | + **user** | [**Array<User>**](Array.md)| List of user object | ### Return type @@ -353,7 +353,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: Not defined diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index 51622b9d2b..bd835789fb 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -24,7 +24,6 @@ require 'petstore/models/api_response' require 'petstore/models/array_of_array_of_number_only' require 'petstore/models/array_of_number_only' require 'petstore/models/array_test' -require 'petstore/models/body4' require 'petstore/models/capitalization' require 'petstore/models/cat' require 'petstore/models/category' diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index dd84c7f1a0..5bae9d7691 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -52,6 +52,8 @@ module Petstore header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index d416003a18..1e6c3e6a3b 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -21,7 +21,7 @@ module Petstore end # Test serialization of outer boolean types # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :body Input boolean as post body + # @option opts [BOOLEAN] :boolean_post_body Input boolean as post body # @return [OuterBoolean] def fake_outer_boolean_serialize(opts = {}) data, _status_code, _headers = fake_outer_boolean_serialize_with_http_info(opts) @@ -30,7 +30,7 @@ module Petstore # Test serialization of outer boolean types # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :body Input boolean as post body + # @option opts [BOOLEAN] :boolean_post_body Input boolean as post body # @return [Array<(OuterBoolean, Fixnum, Hash)>] OuterBoolean data, response status code and response headers def fake_outer_boolean_serialize_with_http_info(opts = {}) if @api_client.config.debugging @@ -46,14 +46,12 @@ module Petstore header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = @api_client.object_to_http_body(opts[:'boolean_post_body']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -94,8 +92,6 @@ module Petstore header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} @@ -142,8 +138,6 @@ module Petstore header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} @@ -190,8 +184,6 @@ module Petstore header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} @@ -211,6 +203,60 @@ module Petstore end return data, status_code, headers end + # @param query + # @param user + # @param [Hash] opts the optional parameters + # @return [nil] + def test_body_with_query_params(query, user, opts = {}) + test_body_with_query_params_with_http_info(query, user, opts) + nil + end + + # @param query + # @param user + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def test_body_with_query_params_with_http_info(query, user, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FakeApi.test_body_with_query_params ...' + end + # verify the required parameter 'query' is set + if @api_client.config.client_side_validation && query.nil? + fail ArgumentError, "Missing the required parameter 'query' when calling FakeApi.test_body_with_query_params" + end + # verify the required parameter 'user' is set + if @api_client.config.client_side_validation && user.nil? + fail ArgumentError, "Missing the required parameter 'user' when calling FakeApi.test_body_with_query_params" + end + # resource path + local_var_path = '/fake/body-with-query-params' + + # query parameters + query_params = {} + query_params[:'query'] = query + + # header parameters + header_params = {} + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(user) + auth_names = [] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FakeApi#test_body_with_query_params\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # To test \"client\" model # To test \"client\" model # @param client client model @@ -244,6 +290,8 @@ module Petstore header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} @@ -336,6 +384,10 @@ module Petstore if @api_client.config.client_side_validation && pattern_without_delimiter.nil? fail ArgumentError, "Missing the required parameter 'pattern_without_delimiter' when calling FakeApi.test_endpoint_parameters" end + if @api_client.config.client_side_validation && pattern_without_delimiter !~ Regexp.new(/^[A-Z].*/) + fail ArgumentError, "invalid value for 'pattern_without_delimiter' when calling FakeApi.test_endpoint_parameters, must conform to the pattern /^[A-Z].*/." + end + # verify the required parameter 'byte' is set if @api_client.config.client_side_validation && byte.nil? fail ArgumentError, "Missing the required parameter 'byte' when calling FakeApi.test_endpoint_parameters" @@ -360,6 +412,10 @@ module Petstore fail ArgumentError, 'invalid value for "opts[:"float"]" when calling FakeApi.test_endpoint_parameters, must be smaller than or equal to 987.6.' end + if @api_client.config.client_side_validation && !opts[:'string'].nil? && opts[:'string'] !~ Regexp.new(/[a-z]/i) + fail ArgumentError, "invalid value for 'opts[:\"string\"]' when calling FakeApi.test_endpoint_parameters, must conform to the pattern /[a-z]/i." + end + if @api_client.config.client_side_validation && !opts[:'password'].nil? && opts[:'password'].to_s.length > 64 fail ArgumentError, 'invalid value for "opts[:"password"]" when calling FakeApi.test_endpoint_parameters, the character length must be smaller than or equal to 64.' end @@ -414,9 +470,9 @@ module Petstore # To test enum parameters # @param [Hash] opts the optional parameters # @option opts [Array] :enum_header_string_array Header parameter enum test (string array) - # @option opts [String] :enum_header_string Header parameter enum test (string) + # @option opts [String] :enum_header_string Header parameter enum test (string) (default to -efg) # @option opts [Array] :enum_query_string_array Query parameter enum test (string array) - # @option opts [String] :enum_query_string Query parameter enum test (string) + # @option opts [String] :enum_query_string Query parameter enum test (string) (default to -efg) # @option opts [Integer] :enum_query_integer Query parameter enum test (double) # @option opts [Float] :enum_query_double Query parameter enum test (double) # @option opts [Array] :enum_form_string_array Form parameter enum test (string array) @@ -443,14 +499,14 @@ module Petstore if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FakeApi.test_enum_parameters ...' end - if @api_client.config.client_side_validation && opts[:'enum_header_string_array'] && !opts[:'enum_header_string_array'].all? { |item| ['>', '$'].include?(item) } - fail ArgumentError, 'invalid value for "enum_header_string_array", must include one of >, $' + if @api_client.config.client_side_validation && opts[:'enum_header_string_array'] && !['>', '$'].include?(opts[:'enum_header_string_array']) + fail ArgumentError, 'invalid value for "enum_header_string_array", must be one of >, $' end if @api_client.config.client_side_validation && opts[:'enum_header_string'] && !['_abc', '-efg', '(xyz)'].include?(opts[:'enum_header_string']) fail ArgumentError, 'invalid value for "enum_header_string", must be one of _abc, -efg, (xyz)' end - if @api_client.config.client_side_validation && opts[:'enum_query_string_array'] && !opts[:'enum_query_string_array'].all? { |item| ['>', '$'].include?(item) } - fail ArgumentError, 'invalid value for "enum_query_string_array", must include one of >, $' + if @api_client.config.client_side_validation && opts[:'enum_query_string_array'] && !['>', '$'].include?(opts[:'enum_query_string_array']) + fail ArgumentError, 'invalid value for "enum_query_string_array", must be one of >, $' end if @api_client.config.client_side_validation && opts[:'enum_query_string'] && !['_abc', '-efg', '(xyz)'].include?(opts[:'enum_query_string']) fail ArgumentError, 'invalid value for "enum_query_string", must be one of _abc, -efg, (xyz)' @@ -472,7 +528,7 @@ module Petstore # query parameters query_params = {} - query_params[:'enum_query_string_array'] = @api_client.build_collection_param(opts[:'enum_query_string_array'], :multi) if !opts[:'enum_query_string_array'].nil? + query_params[:'enum_query_string_array'] = opts[:'enum_query_string_array'] if !opts[:'enum_query_string_array'].nil? query_params[:'enum_query_string'] = opts[:'enum_query_string'] if !opts[:'enum_query_string'].nil? query_params[:'enum_query_integer'] = opts[:'enum_query_integer'] if !opts[:'enum_query_integer'].nil? query_params[:'enum_query_double'] = opts[:'enum_query_double'] if !opts[:'enum_query_double'].nil? @@ -481,7 +537,7 @@ module Petstore header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) - header_params[:'enum_header_string_array'] = @api_client.build_collection_param(opts[:'enum_header_string_array'], :csv) if !opts[:'enum_header_string_array'].nil? + header_params[:'enum_header_string_array'] = opts[:'enum_header_string_array'] if !opts[:'enum_header_string_array'].nil? header_params[:'enum_header_string'] = opts[:'enum_header_string'] if !opts[:'enum_header_string'].nil? # form parameters @@ -504,25 +560,25 @@ module Petstore return data, status_code, headers end # test inline additionalProperties - # @param unknown_base_type request body + # @param request_body request body # @param [Hash] opts the optional parameters # @return [nil] - def test_inline_additional_properties(unknown_base_type, opts = {}) - test_inline_additional_properties_with_http_info(unknown_base_type, opts) + def test_inline_additional_properties(request_body, opts = {}) + test_inline_additional_properties_with_http_info(request_body, opts) nil end # test inline additionalProperties - # @param unknown_base_type request body + # @param request_body request body # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def test_inline_additional_properties_with_http_info(unknown_base_type, opts = {}) + def test_inline_additional_properties_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FakeApi.test_inline_additional_properties ...' end - # verify the required parameter 'unknown_base_type' is set - if @api_client.config.client_side_validation && unknown_base_type.nil? - fail ArgumentError, "Missing the required parameter 'unknown_base_type' when calling FakeApi.test_inline_additional_properties" + # verify the required parameter 'request_body' is set + if @api_client.config.client_side_validation && request_body.nil? + fail ArgumentError, "Missing the required parameter 'request_body' when calling FakeApi.test_inline_additional_properties" end # resource path local_var_path = '/fake/inline-additionalProperties' @@ -539,7 +595,7 @@ module Petstore form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(unknown_base_type) + post_body = @api_client.object_to_http_body(request_body) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -553,22 +609,32 @@ module Petstore return data, status_code, headers end # test json serialization of form data + # @param param field1 + # @param param2 field2 # @param [Hash] opts the optional parameters - # @option opts [Body4] :body4 # @return [nil] - def test_json_form_data(opts = {}) - test_json_form_data_with_http_info(opts) + def test_json_form_data(param, param2, opts = {}) + test_json_form_data_with_http_info(param, param2, opts) nil end # test json serialization of form data + # @param param field1 + # @param param2 field2 # @param [Hash] opts the optional parameters - # @option opts [Body4] :body4 # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def test_json_form_data_with_http_info(opts = {}) + def test_json_form_data_with_http_info(param, param2, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FakeApi.test_json_form_data ...' end + # verify the required parameter 'param' is set + if @api_client.config.client_side_validation && param.nil? + fail ArgumentError, "Missing the required parameter 'param' when calling FakeApi.test_json_form_data" + end + # verify the required parameter 'param2' is set + if @api_client.config.client_side_validation && param2.nil? + fail ArgumentError, "Missing the required parameter 'param2' when calling FakeApi.test_json_form_data" + end # resource path local_var_path = '/fake/jsonFormData' @@ -578,13 +644,15 @@ module Petstore # header parameters header_params = {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = {} + form_params['param'] = param + form_params['param2'] = param2 # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body4']) + post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index 4f05959e5b..1e2542794f 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -52,6 +52,8 @@ module Petstore header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 5888e86acd..204235e155 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -48,6 +48,8 @@ module Petstore # header parameters header_params = {} + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml']) # form parameters form_params = {} @@ -144,7 +146,7 @@ module Petstore # query parameters query_params = {} - query_params[:'status'] = @api_client.build_collection_param(status, :csv) + query_params[:'status'] = status # header parameters header_params = {} @@ -197,7 +199,7 @@ module Petstore # query parameters query_params = {} - query_params[:'tags'] = @api_client.build_collection_param(tags, :csv) + query_params[:'tags'] = tags # header parameters header_params = {} @@ -303,6 +305,8 @@ module Petstore # header parameters header_params = {} + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml']) # form parameters form_params = {} diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index fbfcc61a21..6dcbbe74b7 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -205,8 +205,6 @@ module Petstore header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/xml', 'application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index ba69900028..7b8c2ecf72 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -50,8 +50,6 @@ module Petstore # header parameters header_params = {} - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} @@ -399,8 +397,6 @@ module Petstore # header parameters header_params = {} - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index 6792db0f60..c995a6d894 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -187,10 +187,18 @@ module Petstore invalid_properties.push('invalid value for "double", must be greater than or equal to 67.8.') end + if !@string.nil? && @string !~ Regexp.new(/[a-z]/i) + invalid_properties.push('invalid value for "string", must conform to the pattern /[a-z]/i.') + end + if @byte.nil? invalid_properties.push('invalid value for "byte", byte cannot be nil.') end + if @byte !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/) + invalid_properties.push('invalid value for "byte", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.') + end + if @date.nil? invalid_properties.push('invalid value for "date", date cannot be nil.') end @@ -224,7 +232,9 @@ module Petstore return false if !@float.nil? && @float < 54.3 return false if !@double.nil? && @double > 123.4 return false if !@double.nil? && @double < 67.8 + return false if !@string.nil? && @string !~ Regexp.new(/[a-z]/i) return false if @byte.nil? + return false if @byte !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/) return false if @date.nil? return false if @password.nil? return false if @password.to_s.length > 64 @@ -306,6 +316,30 @@ module Petstore @double = double end + # Custom attribute writer method with validation + # @param [Object] string Value to be assigned + def string=(string) + if !string.nil? && string !~ Regexp.new(/[a-z]/i) + fail ArgumentError, 'invalid value for "string", must conform to the pattern /[a-z]/i.' + end + + @string = string + end + + # Custom attribute writer method with validation + # @param [Object] byte Value to be assigned + def byte=(byte) + if byte.nil? + fail ArgumentError, 'byte cannot be nil' + end + + if byte !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/) + fail ArgumentError, 'invalid value for "byte", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.' + end + + @byte = byte + end + # Custom attribute writer method with validation # @param [Object] password Value to be assigned def password=(password) diff --git a/samples/html2/.swagger-codegen/VERSION b/samples/html2/.swagger-codegen/VERSION index f9f7450d13..096bf47efe 100644 --- a/samples/html2/.swagger-codegen/VERSION +++ b/samples/html2/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/html2/index.html b/samples/html2/index.html index 1cfa1180b4..3c10d23aac 100644 --- a/samples/html2/index.html +++ b/samples/html2/index.html @@ -63,6 +63,7 @@ h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify" */ (function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"
"+(escaped?code:escape(code,true))+"\n
"}return'
'+(escaped?code:escape(code,true))+"\n
\n"};Renderer.prototype.blockquote=function(quote){return"
\n"+quote+"
\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"'+text+"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"\n"};Renderer.prototype.listitem=function(text){return"
  • "+text+"
  • \n"};Renderer.prototype.paragraph=function(text){return"

    "+text+"

    \n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
    \n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?"
    ":"
    "};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='
    ";return out};Renderer.prototype.image=function(href,title,text){var out=''+text+'":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occurred:

    "+escape(e.message+"",true)+"
    "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); + -
    +
    @@ -1370,10 +1361,8 @@ var petstore_auth = defaultClient.authentications['petstore_auth']; petstore_auth.accessToken = "YOUR ACCESS TOKEN" var api = new SwaggerPetstore.PetApi() - var petId = 789; // {Long} Pet id to delete - -var opts = { +var opts = { 'apiKey': apiKey_example // {String} }; @@ -1684,10 +1673,8 @@ var petstore_auth = defaultClient.authentications['petstore_auth']; petstore_auth.accessToken = "YOUR ACCESS TOKEN" var api = new SwaggerPetstore.PetApi() - var status = ; // {array[String]} Status values that need to be considered for filter - var callback = function(error, data, response) { if (error) { console.error(error); @@ -1854,10 +1841,22 @@ except ApiException as e: $(document).ready(function() { var schemaWrapper = { "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" + "content" : { + "application/xml" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Pet" + } + } + }, + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Pet" + } + } } } }; @@ -2014,10 +2013,8 @@ var petstore_auth = defaultClient.authentications['petstore_auth']; petstore_auth.accessToken = "YOUR ACCESS TOKEN" var api = new SwaggerPetstore.PetApi() - var tags = ; // {array[String]} Tags to filter by - var callback = function(error, data, response) { if (error) { console.error(error); @@ -2184,10 +2181,22 @@ except ApiException as e: $(document).ready(function() { var schemaWrapper = { "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" + "content" : { + "application/xml" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Pet" + } + } + }, + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Pet" + } + } } } }; @@ -2350,10 +2359,8 @@ api_key.apiKey = "YOUR API KEY" //api_key.apiKeyPrefix['api_key'] = "Token" var api = new SwaggerPetstore.PetApi() - var petId = 789; // {Long} ID of pet to return - var callback = function(error, data, response) { if (error) { console.error(error); @@ -2531,8 +2538,17 @@ except ApiException as e: $(document).ready(function() { var schemaWrapper = { "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + } } }; var schema = schemaWrapper.schema; @@ -2630,9 +2646,9 @@ public class PetApiExample { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); - Pet body = ; // Pet | Pet object that needs to be added to the store + Pet pet = ; // Pet | try { - apiInstance.updatePet(body); + apiInstance.updatePet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); e.printStackTrace(); @@ -2648,9 +2664,9 @@ public class PetApiExample { public static void main(String[] args) { PetApi apiInstance = new PetApi(); - Pet body = ; // Pet | Pet object that needs to be added to the store + Pet pet = ; // Pet | try { - apiInstance.updatePet(body); + apiInstance.updatePet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); e.printStackTrace(); @@ -2668,12 +2684,12 @@ public class PetApiExample { // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth) [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -Pet *body = ; // Pet object that needs to be added to the store +Pet *pet = ; // PetApi *apiInstance = [[PetApi alloc] init]; // Update an existing pet -[apiInstance updatePetWith:body +[apiInstance updatePetWith:pet completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); @@ -2691,9 +2707,7 @@ var petstore_auth = defaultClient.authentications['petstore_auth']; petstore_auth.accessToken = "YOUR ACCESS TOKEN" var api = new SwaggerPetstore.PetApi() - -var body = ; // {Pet} Pet object that needs to be added to the store - +var pet = ; // {Pet} var callback = function(error, data, response) { if (error) { @@ -2702,7 +2716,7 @@ var callback = function(error, data, response) { console.log('API called successfully.'); } }; -api.updatePet(body, callback); +api.updatePet(pet, callback); @@ -2727,12 +2741,12 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(); - var body = new Pet(); // Pet | Pet object that needs to be added to the store + var pet = new Pet(); // Pet | try { // Update an existing pet - apiInstance.updatePet(body); + apiInstance.updatePet(pet); } catch (Exception e) { @@ -2752,10 +2766,10 @@ require_once(__DIR__ . '/vendor/autoload.php'); Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new Swagger\Client\Api\PetApi(); -$body = ; // Pet | Pet object that needs to be added to the store +$pet = ; // Pet | try { - $api_instance->updatePet($body); + $api_instance->updatePet($pet); } catch (Exception $e) { echo 'Exception when calling PetApi->updatePet: ', $e->getMessage(), PHP_EOL; } @@ -2771,10 +2785,10 @@ use WWW::SwaggerClient::PetApi; $WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN'; my $api_instance = WWW::SwaggerClient::PetApi->new(); -my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store +my $pet = WWW::SwaggerClient::Object::Pet->new(); # Pet | eval { - $api_instance->updatePet(body => $body); + $api_instance->updatePet(pet => $pet); }; if ($@) { warn "Exception when calling PetApi->updatePet: $@\n"; @@ -2793,11 +2807,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = swagger_client.PetApi() -body = # Pet | Pet object that needs to be added to the store +pet = # Pet | try: # Update an existing pet - api_instance.update_pet(body) + api_instance.update_pet(pet) except ApiException as e: print("Exception when calling PetApi->updatePet: %s\n" % e) @@ -2813,21 +2827,13 @@ except ApiException as e: Name Description - body * + pet * -
    +
    @@ -3002,10 +3008,8 @@ var petstore_auth = defaultClient.authentications['petstore_auth']; petstore_auth.accessToken = "YOUR ACCESS TOKEN" var api = new SwaggerPetstore.PetApi() - var petId = 789; // {Long} ID of pet that needs to be updated - -var opts = { +var opts = { 'name': name_example, // {String} Updated name of the pet 'status': status_example // {String} Updated status of the pet }; @@ -3280,7 +3284,7 @@ public class PetApiExample { PetApi apiInstance = new PetApi(); Long petId = 789; // Long | ID of pet to update String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server - File file = /path/to/file.txt; // File | file to upload + File file = BINARY_DATA_HERE; // File | file to upload try { ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); System.out.println(result); @@ -3301,7 +3305,7 @@ public class PetApiExample { PetApi apiInstance = new PetApi(); Long petId = 789; // Long | ID of pet to update String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server - File file = /path/to/file.txt; // File | file to upload + File file = BINARY_DATA_HERE; // File | file to upload try { ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); System.out.println(result); @@ -3324,7 +3328,7 @@ public class PetApiExample { Long *petId = 789; // ID of pet to update String *additionalMetadata = additionalMetadata_example; // Additional data to pass to server (optional) -File *file = /path/to/file.txt; // file to upload (optional) +File *file = BINARY_DATA_HERE; // file to upload (optional) PetApi *apiInstance = [[PetApi alloc] init]; @@ -3352,12 +3356,10 @@ var petstore_auth = defaultClient.authentications['petstore_auth']; petstore_auth.accessToken = "YOUR ACCESS TOKEN" var api = new SwaggerPetstore.PetApi() - var petId = 789; // {Long} ID of pet to update - -var opts = { +var opts = { 'additionalMetadata': additionalMetadata_example, // {String} Additional data to pass to server - 'file': /path/to/file.txt // {File} file to upload + 'file': BINARY_DATA_HERE // {File} file to upload }; var callback = function(error, data, response) { @@ -3394,7 +3396,7 @@ namespace Example var apiInstance = new PetApi(); var petId = 789; // Long | ID of pet to update var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server (optional) - var file = new File(); // File | file to upload (optional) + var file = BINARY_DATA_HERE; // File | file to upload (optional) try { @@ -3422,7 +3424,7 @@ Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_AC $api_instance = new Swagger\Client\Api\PetApi(); $petId = 789; // Long | ID of pet to update $additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server -$file = /path/to/file.txt; // File | file to upload +$file = BINARY_DATA_HERE; // File | file to upload try { $result = $api_instance->uploadFile($petId, $additionalMetadata, $file); @@ -3444,7 +3446,7 @@ $WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN'; my $api_instance = WWW::SwaggerClient::PetApi->new(); my $petId = 789; # Long | ID of pet to update my $additionalMetadata = additionalMetadata_example; # String | Additional data to pass to server -my $file = /path/to/file.txt; # File | file to upload +my $file = BINARY_DATA_HERE; # File | file to upload eval { my $result = $api_instance->uploadFile(petId => $petId, additionalMetadata => $additionalMetadata, file => $file); @@ -3469,7 +3471,7 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = swagger_client.PetApi() petId = 789 # Long | ID of pet to update additionalMetadata = additionalMetadata_example # String | Additional data to pass to server (optional) -file = /path/to/file.txt # File | file to upload (optional) +file = BINARY_DATA_HERE # File | file to upload (optional) try: # uploads an image @@ -3554,6 +3556,9 @@ except ApiException as e: File + + (binary) +
    file to upload @@ -3584,8 +3589,12 @@ except ApiException as e: $(document).ready(function() { var schemaWrapper = { "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponse" + } + } } }; var schema = schemaWrapper.schema; @@ -3716,10 +3725,8 @@ StoreApi *apiInstance = [[StoreApi alloc] init];
    var SwaggerPetstore = require('swagger_petstore');
     
     var api = new SwaggerPetstore.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);
    @@ -3995,7 +4002,6 @@ api_key.apiKey = "YOUR API KEY"
     //api_key.apiKeyPrefix['api_key'] = "Token"
     
     var api = new SwaggerPetstore.StoreApi()
    -
     var callback = function(error, data, response) {
       if (error) {
         console.error(error);
    @@ -4136,11 +4142,15 @@ except ApiException as e:
                                           $(document).ready(function() {
                                             var schemaWrapper = {
       "description" : "successful operation",
    -  "schema" : {
    -    "type" : "object",
    -    "additionalProperties" : {
    -      "type" : "integer",
    -      "format" : "int32"
    +  "content" : {
    +    "application/json" : {
    +      "schema" : {
    +        "type" : "object",
    +        "additionalProperties" : {
    +          "type" : "integer",
    +          "format" : "int32"
    +        }
    +      }
         }
       }
     };
    @@ -4274,10 +4284,8 @@ StoreApi *apiInstance = [[StoreApi alloc] init];
                                   
    var SwaggerPetstore = require('swagger_petstore');
     
     var api = new SwaggerPetstore.StoreApi()
    -
     var orderId = 789; // {Long} ID of pet that needs to be fetched
     
    -
     var callback = function(error, data, response) {
       if (error) {
         console.error(error);
    @@ -4435,8 +4443,17 @@ except ApiException as e:
                                           $(document).ready(function() {
                                             var schemaWrapper = {
       "description" : "successful operation",
    -  "schema" : {
    -    "$ref" : "#/definitions/Order"
    +  "content" : {
    +    "application/xml" : {
    +      "schema" : {
    +        "$ref" : "#/components/schemas/Order"
    +      }
    +    },
    +    "application/json" : {
    +      "schema" : {
    +        "$ref" : "#/components/schemas/Order"
    +      }
    +    }
       }
     };
                                             var schema = schemaWrapper.schema;
    @@ -4529,9 +4546,9 @@ public class StoreApiExample {
         public static void main(String[] args) {
             
             StoreApi apiInstance = new StoreApi();
    -        Order body = ; // Order | order placed for purchasing the pet
    +        Order order = ; // Order | 
             try {
    -            Order result = apiInstance.placeOrder(body);
    +            Order result = apiInstance.placeOrder(order);
                 System.out.println(result);
             } catch (ApiException e) {
                 System.err.println("Exception when calling StoreApi#placeOrder");
    @@ -4548,9 +4565,9 @@ public class StoreApiExample {
     
         public static void main(String[] args) {
             StoreApi apiInstance = new StoreApi();
    -        Order body = ; // Order | order placed for purchasing the pet
    +        Order order = ; // Order | 
             try {
    -            Order result = apiInstance.placeOrder(body);
    +            Order result = apiInstance.placeOrder(order);
                 System.out.println(result);
             } catch (ApiException e) {
                 System.err.println("Exception when calling StoreApi#placeOrder");
    @@ -4564,12 +4581,12 @@ public class StoreApiExample {
       
    Coming Soon!
    -->
    -
    Order *body = ; // order placed for purchasing the pet
    +                              
    Order *order = ; // 
     
     StoreApi *apiInstance = [[StoreApi alloc] init];
     
     // Place an order for a pet
    -[apiInstance placeOrderWith:body
    +[apiInstance placeOrderWith:order
                   completionHandler: ^(Order output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
    @@ -4585,9 +4602,7 @@ StoreApi *apiInstance = [[StoreApi alloc] init];
                                   
    var SwaggerPetstore = require('swagger_petstore');
     
     var api = new SwaggerPetstore.StoreApi()
    -
    -var body = ; // {Order} order placed for purchasing the pet
    -
    +var order = ; // {Order} 
     
     var callback = function(error, data, response) {
       if (error) {
    @@ -4596,7 +4611,7 @@ var callback = function(error, data, response) {
         console.log('API called successfully. Returned data: ' + data);
       }
     };
    -api.placeOrder(body, callback);
    +api.placeOrder(order, callback);
     
    @@ -4618,12 +4633,12 @@ namespace Example { var apiInstance = new StoreApi(); - var body = new Order(); // Order | order placed for purchasing the pet + var order = new Order(); // Order | try { // Place an order for a pet - Order result = apiInstance.placeOrder(body); + Order result = apiInstance.placeOrder(order); Debug.WriteLine(result); } catch (Exception e) @@ -4641,10 +4656,10 @@ namespace Example require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new Swagger\Client\Api\StoreApi(); -$body = ; // Order | order placed for purchasing the pet +$order = ; // Order | try { - $result = $api_instance->placeOrder($body); + $result = $api_instance->placeOrder($order); print_r($result); } catch (Exception $e) { echo 'Exception when calling StoreApi->placeOrder: ', $e->getMessage(), PHP_EOL; @@ -4658,10 +4673,10 @@ use WWW::SwaggerClient::Configuration; use WWW::SwaggerClient::StoreApi; my $api_instance = WWW::SwaggerClient::StoreApi->new(); -my $body = WWW::SwaggerClient::Object::Order->new(); # Order | order placed for purchasing the pet +my $order = WWW::SwaggerClient::Object::Order->new(); # Order | eval { - my $result = $api_instance->placeOrder(body => $body); + my $result = $api_instance->placeOrder(order => $order); print Dumper($result); }; if ($@) { @@ -4678,11 +4693,11 @@ from pprint import pprint # create an instance of the API class api_instance = swagger_client.StoreApi() -body = # Order | order placed for purchasing the pet +order = # Order | try: # Place an order for a pet - api_response = api_instance.place_order(body) + api_response = api_instance.place_order(order) pprint(api_response) except ApiException as e: print("Exception when calling StoreApi->placeOrder: %s\n" % e) @@ -4699,21 +4714,13 @@ except ApiException as e: Name Description - body * + order * -
    +
    @@ -4755,8 +4762,17 @@ $(document).ready(function() { $(document).ready(function() { var schemaWrapper = { "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Order" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Order" + } + } } }; var schema = schemaWrapper.schema; @@ -4844,9 +4860,9 @@ public class UserApiExample { public static void main(String[] args) { UserApi apiInstance = new UserApi(); - User body = ; // User | Created user object + User user = ; // User | try { - apiInstance.createUser(body); + apiInstance.createUser(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); e.printStackTrace(); @@ -4862,9 +4878,9 @@ public class UserApiExample { public static void main(String[] args) { UserApi apiInstance = new UserApi(); - User body = ; // User | Created user object + User user = ; // User | try { - apiInstance.createUser(body); + apiInstance.createUser(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); e.printStackTrace(); @@ -4877,12 +4893,12 @@ public class UserApiExample {
    Coming Soon!
    -->
    -
    User *body = ; // Created user object
    +                              
    User *user = ; // 
     
     UserApi *apiInstance = [[UserApi alloc] init];
     
     // Create user
    -[apiInstance createUserWith:body
    +[apiInstance createUserWith:user
                   completionHandler: ^(NSError* error) {
                                 if (error) {
                                     NSLog(@"Error: %@", error);
    @@ -4895,9 +4911,7 @@ UserApi *apiInstance = [[UserApi alloc] init];
                                   
    var SwaggerPetstore = require('swagger_petstore');
     
     var api = new SwaggerPetstore.UserApi()
    -
    -var body = ; // {User} Created user object
    -
    +var user = ; // {User} 
     
     var callback = function(error, data, response) {
       if (error) {
    @@ -4906,7 +4920,7 @@ var callback = function(error, data, response) {
         console.log('API called successfully.');
       }
     };
    -api.createUser(body, callback);
    +api.createUser(user, callback);
     
    @@ -4928,12 +4942,12 @@ namespace Example { var apiInstance = new UserApi(); - var body = new User(); // User | Created user object + var user = new User(); // User | try { // Create user - apiInstance.createUser(body); + apiInstance.createUser(user); } catch (Exception e) { @@ -4950,10 +4964,10 @@ namespace Example require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new Swagger\Client\Api\UserApi(); -$body = ; // User | Created user object +$user = ; // User | try { - $api_instance->createUser($body); + $api_instance->createUser($user); } catch (Exception $e) { echo 'Exception when calling UserApi->createUser: ', $e->getMessage(), PHP_EOL; } @@ -4966,10 +4980,10 @@ use WWW::SwaggerClient::Configuration; use WWW::SwaggerClient::UserApi; my $api_instance = WWW::SwaggerClient::UserApi->new(); -my $body = WWW::SwaggerClient::Object::User->new(); # User | Created user object +my $user = WWW::SwaggerClient::Object::User->new(); # User | eval { - $api_instance->createUser(body => $body); + $api_instance->createUser(user => $user); }; if ($@) { warn "Exception when calling UserApi->createUser: $@\n"; @@ -4985,11 +4999,11 @@ from pprint import pprint # create an instance of the API class api_instance = swagger_client.UserApi() -body = # User | Created user object +user = # User | try: # Create user - api_instance.create_user(body) + api_instance.create_user(user) except ApiException as e: print("Exception when calling UserApi->createUser: %s\n" % e) @@ -5005,21 +5019,13 @@ except ApiException as e: Name Description - body * + user * -
    +
    @@ -5104,9 +5110,9 @@ public class UserApiExample { public static void main(String[] args) { UserApi apiInstance = new UserApi(); - array[User] body = ; // array[User] | List of user object + array[User] user = ; // array[User] | try { - apiInstance.createUsersWithArrayInput(body); + apiInstance.createUsersWithArrayInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); e.printStackTrace(); @@ -5122,9 +5128,9 @@ public class UserApiExample { public static void main(String[] args) { UserApi apiInstance = new UserApi(); - array[User] body = ; // array[User] | List of user object + array[User] user = ; // array[User] | try { - apiInstance.createUsersWithArrayInput(body); + apiInstance.createUsersWithArrayInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); e.printStackTrace(); @@ -5137,12 +5143,12 @@ public class UserApiExample {
    Coming Soon!
    -->
    -
    array[User] *body = ; // List of user object
    +                              
    array[User] *user = ; // 
     
     UserApi *apiInstance = [[UserApi alloc] init];
     
     // Creates list of users with given input array
    -[apiInstance createUsersWithArrayInputWith:body
    +[apiInstance createUsersWithArrayInputWith:user
                   completionHandler: ^(NSError* error) {
                                 if (error) {
                                     NSLog(@"Error: %@", error);
    @@ -5155,9 +5161,7 @@ UserApi *apiInstance = [[UserApi alloc] init];
                                   
    var SwaggerPetstore = require('swagger_petstore');
     
     var api = new SwaggerPetstore.UserApi()
    -
    -var body = ; // {array[User]} List of user object
    -
    +var user = ; // {array[User]} 
     
     var callback = function(error, data, response) {
       if (error) {
    @@ -5166,7 +5170,7 @@ var callback = function(error, data, response) {
         console.log('API called successfully.');
       }
     };
    -api.createUsersWithArrayInput(body, callback);
    +api.createUsersWithArrayInput(user, callback);
     
    @@ -5188,12 +5192,12 @@ namespace Example { var apiInstance = new UserApi(); - var body = new array[User](); // array[User] | List of user object + var user = new array[User](); // array[User] | try { // Creates list of users with given input array - apiInstance.createUsersWithArrayInput(body); + apiInstance.createUsersWithArrayInput(user); } catch (Exception e) { @@ -5210,10 +5214,10 @@ namespace Example require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new Swagger\Client\Api\UserApi(); -$body = ; // array[User] | List of user object +$user = ; // array[User] | try { - $api_instance->createUsersWithArrayInput($body); + $api_instance->createUsersWithArrayInput($user); } catch (Exception $e) { echo 'Exception when calling UserApi->createUsersWithArrayInput: ', $e->getMessage(), PHP_EOL; } @@ -5226,10 +5230,10 @@ use WWW::SwaggerClient::Configuration; use WWW::SwaggerClient::UserApi; my $api_instance = WWW::SwaggerClient::UserApi->new(); -my $body = [WWW::SwaggerClient::Object::array[User]->new()]; # array[User] | List of user object +my $user = [WWW::SwaggerClient::Object::array[User]->new()]; # array[User] | eval { - $api_instance->createUsersWithArrayInput(body => $body); + $api_instance->createUsersWithArrayInput(user => $user); }; if ($@) { warn "Exception when calling UserApi->createUsersWithArrayInput: $@\n"; @@ -5245,11 +5249,11 @@ from pprint import pprint # create an instance of the API class api_instance = swagger_client.UserApi() -body = # array[User] | List of user object +user = # array[User] | try: # Creates list of users with given input array - api_instance.create_users_with_array_input(body) + api_instance.create_users_with_array_input(user) except ApiException as e: print("Exception when calling UserApi->createUsersWithArrayInput: %s\n" % e) @@ -5265,24 +5269,13 @@ except ApiException as e: Name Description - body * + user * -
    +
    @@ -5367,9 +5360,9 @@ public class UserApiExample { public static void main(String[] args) { UserApi apiInstance = new UserApi(); - array[User] body = ; // array[User] | List of user object + array[User] user = ; // array[User] | try { - apiInstance.createUsersWithListInput(body); + apiInstance.createUsersWithListInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); e.printStackTrace(); @@ -5385,9 +5378,9 @@ public class UserApiExample { public static void main(String[] args) { UserApi apiInstance = new UserApi(); - array[User] body = ; // array[User] | List of user object + array[User] user = ; // array[User] | try { - apiInstance.createUsersWithListInput(body); + apiInstance.createUsersWithListInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); e.printStackTrace(); @@ -5400,12 +5393,12 @@ public class UserApiExample {
    Coming Soon!
    -->
    -
    array[User] *body = ; // List of user object
    +                              
    array[User] *user = ; // 
     
     UserApi *apiInstance = [[UserApi alloc] init];
     
     // Creates list of users with given input array
    -[apiInstance createUsersWithListInputWith:body
    +[apiInstance createUsersWithListInputWith:user
                   completionHandler: ^(NSError* error) {
                                 if (error) {
                                     NSLog(@"Error: %@", error);
    @@ -5418,9 +5411,7 @@ UserApi *apiInstance = [[UserApi alloc] init];
                                   
    var SwaggerPetstore = require('swagger_petstore');
     
     var api = new SwaggerPetstore.UserApi()
    -
    -var body = ; // {array[User]} List of user object
    -
    +var user = ; // {array[User]} 
     
     var callback = function(error, data, response) {
       if (error) {
    @@ -5429,7 +5420,7 @@ var callback = function(error, data, response) {
         console.log('API called successfully.');
       }
     };
    -api.createUsersWithListInput(body, callback);
    +api.createUsersWithListInput(user, callback);
     
    @@ -5451,12 +5442,12 @@ namespace Example { var apiInstance = new UserApi(); - var body = new array[User](); // array[User] | List of user object + var user = new array[User](); // array[User] | try { // Creates list of users with given input array - apiInstance.createUsersWithListInput(body); + apiInstance.createUsersWithListInput(user); } catch (Exception e) { @@ -5473,10 +5464,10 @@ namespace Example require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new Swagger\Client\Api\UserApi(); -$body = ; // array[User] | List of user object +$user = ; // array[User] | try { - $api_instance->createUsersWithListInput($body); + $api_instance->createUsersWithListInput($user); } catch (Exception $e) { echo 'Exception when calling UserApi->createUsersWithListInput: ', $e->getMessage(), PHP_EOL; } @@ -5489,10 +5480,10 @@ use WWW::SwaggerClient::Configuration; use WWW::SwaggerClient::UserApi; my $api_instance = WWW::SwaggerClient::UserApi->new(); -my $body = [WWW::SwaggerClient::Object::array[User]->new()]; # array[User] | List of user object +my $user = [WWW::SwaggerClient::Object::array[User]->new()]; # array[User] | eval { - $api_instance->createUsersWithListInput(body => $body); + $api_instance->createUsersWithListInput(user => $user); }; if ($@) { warn "Exception when calling UserApi->createUsersWithListInput: $@\n"; @@ -5508,11 +5499,11 @@ from pprint import pprint # create an instance of the API class api_instance = swagger_client.UserApi() -body = # array[User] | List of user object +user = # array[User] | try: # Creates list of users with given input array - api_instance.create_users_with_list_input(body) + api_instance.create_users_with_list_input(user) except ApiException as e: print("Exception when calling UserApi->createUsersWithListInput: %s\n" % e) @@ -5528,24 +5519,13 @@ except ApiException as e: Name Description - body * + user * -
    +
    @@ -5681,10 +5661,8 @@ UserApi *apiInstance = [[UserApi alloc] init];
    var SwaggerPetstore = require('swagger_petstore');
     
     var api = new SwaggerPetstore.UserApi()
    -
     var username = username_example; // {String} The name that needs to be deleted
     
    -
     var callback = function(error, data, response) {
       if (error) {
         console.error(error);
    @@ -5886,7 +5864,7 @@ public class UserApiExample {
         public static void main(String[] args) {
             
             UserApi apiInstance = new UserApi();
    -        String username = username_example; // String | The name that needs to be fetched. Use user1 for testing. 
    +        String username = username_example; // String | The name that needs to be fetched. Use user1 for testing.
             try {
                 User result = apiInstance.getUserByName(username);
                 System.out.println(result);
    @@ -5905,7 +5883,7 @@ public class UserApiExample {
     
         public static void main(String[] args) {
             UserApi apiInstance = new UserApi();
    -        String username = username_example; // String | The name that needs to be fetched. Use user1 for testing. 
    +        String username = username_example; // String | The name that needs to be fetched. Use user1 for testing.
             try {
                 User result = apiInstance.getUserByName(username);
                 System.out.println(result);
    @@ -5921,7 +5899,7 @@ public class UserApiExample {
       
    Coming Soon!
    -->
    -
    String *username = username_example; // The name that needs to be fetched. Use user1 for testing. 
    +                              
    String *username = username_example; // The name that needs to be fetched. Use user1 for testing.
     
     UserApi *apiInstance = [[UserApi alloc] init];
     
    @@ -5942,9 +5920,7 @@ UserApi *apiInstance = [[UserApi alloc] init];
                                   
    var SwaggerPetstore = require('swagger_petstore');
     
     var api = new SwaggerPetstore.UserApi()
    -
    -var username = username_example; // {String} The name that needs to be fetched. Use user1 for testing. 
    -
    +var username = username_example; // {String} The name that needs to be fetched. Use user1 for testing.
     
     var callback = function(error, data, response) {
       if (error) {
    @@ -5975,7 +5951,7 @@ namespace Example
             {
                 
                 var apiInstance = new UserApi();
    -            var username = username_example;  // String | The name that needs to be fetched. Use user1 for testing. 
    +            var username = username_example;  // String | The name that needs to be fetched. Use user1 for testing.
     
                 try
                 {
    @@ -5998,7 +5974,7 @@ namespace Example
     require_once(__DIR__ . '/vendor/autoload.php');
     
     $api_instance = new Swagger\Client\Api\UserApi();
    -$username = username_example; // String | The name that needs to be fetched. Use user1 for testing. 
    +$username = username_example; // String | The name that needs to be fetched. Use user1 for testing.
     
     try {
         $result = $api_instance->getUserByName($username);
    @@ -6015,7 +5991,7 @@ use WWW::SwaggerClient::Configuration;
     use WWW::SwaggerClient::UserApi;
     
     my $api_instance = WWW::SwaggerClient::UserApi->new();
    -my $username = username_example; # String | The name that needs to be fetched. Use user1 for testing. 
    +my $username = username_example; # String | The name that needs to be fetched. Use user1 for testing.
     
     eval { 
         my $result = $api_instance->getUserByName(username => $username);
    @@ -6035,7 +6011,7 @@ from pprint import pprint
     
     # create an instance of the API class
     api_instance = swagger_client.UserApi()
    -username = username_example # String | The name that needs to be fetched. Use user1 for testing. 
    +username = username_example # String | The name that needs to be fetched. Use user1 for testing.
     
     try: 
         # Get user by user name
    @@ -6066,7 +6042,7 @@ except ApiException as e:
                     
     
                         
    - The name that needs to be fetched. Use user1 for testing. + The name that needs to be fetched. Use user1 for testing.
    @@ -6100,8 +6076,17 @@ except ApiException as e: $(document).ready(function() { var schemaWrapper = { "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + } } }; var schema = schemaWrapper.schema; @@ -6254,12 +6239,9 @@ UserApi *apiInstance = [[UserApi alloc] init];
    var SwaggerPetstore = require('swagger_petstore');
     
     var api = new SwaggerPetstore.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);
    @@ -6444,19 +6426,32 @@ except ApiException as e:
                                           $(document).ready(function() {
                                             var schemaWrapper = {
       "description" : "successful operation",
    -  "schema" : {
    -    "type" : "string"
    -  },
       "headers" : {
         "X-Rate-Limit" : {
    -      "type" : "integer",
    -      "format" : "int32",
    -      "description" : "calls per hour allowed by the user"
    +      "description" : "calls per hour allowed by the user",
    +      "schema" : {
    +        "type" : "integer",
    +        "format" : "int32"
    +      }
         },
         "X-Expires-After" : {
    -      "type" : "string",
    -      "format" : "date-time",
    -      "description" : "date in UTC when toekn expires"
    +      "description" : "date in UTC when toekn expires",
    +      "schema" : {
    +        "type" : "string",
    +        "format" : "date-time"
    +      }
    +    }
    +  },
    +  "content" : {
    +    "application/xml" : {
    +      "schema" : {
    +        "type" : "string"
    +      }
    +    },
    +    "application/json" : {
    +      "schema" : {
    +        "type" : "string"
    +      }
         }
       }
     };
    @@ -6612,7 +6607,6 @@ UserApi *apiInstance = [[UserApi alloc] init];
                                   
    var SwaggerPetstore = require('swagger_petstore');
     
     var api = new SwaggerPetstore.UserApi()
    -
     var callback = function(error, data, response) {
       if (error) {
         console.error(error);
    @@ -6773,9 +6767,9 @@ public class UserApiExample {
             
             UserApi apiInstance = new UserApi();
             String username = username_example; // String | name that need to be deleted
    -        User body = ; // User | Updated user object
    +        User user = ; // User | 
             try {
    -            apiInstance.updateUser(username, body);
    +            apiInstance.updateUser(username, user);
             } catch (ApiException e) {
                 System.err.println("Exception when calling UserApi#updateUser");
                 e.printStackTrace();
    @@ -6792,9 +6786,9 @@ public class UserApiExample {
         public static void main(String[] args) {
             UserApi apiInstance = new UserApi();
             String username = username_example; // String | name that need to be deleted
    -        User body = ; // User | Updated user object
    +        User user = ; // User | 
             try {
    -            apiInstance.updateUser(username, body);
    +            apiInstance.updateUser(username, user);
             } catch (ApiException e) {
                 System.err.println("Exception when calling UserApi#updateUser");
                 e.printStackTrace();
    @@ -6808,13 +6802,13 @@ public class UserApiExample {
       
    -->
    String *username = username_example; // name that need to be deleted
    -User *body = ; // Updated user object
    +User *user = ; // 
     
     UserApi *apiInstance = [[UserApi alloc] init];
     
     // Updated user
     [apiInstance updateUserWith:username
    -    body:body
    +    user:user
                   completionHandler: ^(NSError* error) {
                                 if (error) {
                                     NSLog(@"Error: %@", error);
    @@ -6827,11 +6821,8 @@ UserApi *apiInstance = [[UserApi alloc] init];
                                   
    var SwaggerPetstore = require('swagger_petstore');
     
     var api = new SwaggerPetstore.UserApi()
    -
     var username = username_example; // {String} name that need to be deleted
    -
    -var body = ; // {User} Updated user object
    -
    +var user = ; // {User} 
     
     var callback = function(error, data, response) {
       if (error) {
    @@ -6840,7 +6831,7 @@ var callback = function(error, data, response) {
         console.log('API called successfully.');
       }
     };
    -api.updateUser(username, body, callback);
    +api.updateUser(username, user, callback);
     
    @@ -6863,12 +6854,12 @@ namespace Example var apiInstance = new UserApi(); var username = username_example; // String | name that need to be deleted - var body = new User(); // User | Updated user object + var user = new User(); // User | try { // Updated user - apiInstance.updateUser(username, body); + apiInstance.updateUser(username, user); } catch (Exception e) { @@ -6886,10 +6877,10 @@ require_once(__DIR__ . '/vendor/autoload.php'); $api_instance = new Swagger\Client\Api\UserApi(); $username = username_example; // String | name that need to be deleted -$body = ; // User | Updated user object +$user = ; // User | try { - $api_instance->updateUser($username, $body); + $api_instance->updateUser($username, $user); } catch (Exception $e) { echo 'Exception when calling UserApi->updateUser: ', $e->getMessage(), PHP_EOL; } @@ -6903,10 +6894,10 @@ use WWW::SwaggerClient::UserApi; my $api_instance = WWW::SwaggerClient::UserApi->new(); my $username = username_example; # String | name that need to be deleted -my $body = WWW::SwaggerClient::Object::User->new(); # User | Updated user object +my $user = WWW::SwaggerClient::Object::User->new(); # User | eval { - $api_instance->updateUser(username => $username, body => $body); + $api_instance->updateUser(username => $username, user => $user); }; if ($@) { warn "Exception when calling UserApi->updateUser: $@\n"; @@ -6923,11 +6914,11 @@ from pprint import pprint # create an instance of the API class api_instance = swagger_client.UserApi() username = username_example # String | name that need to be deleted -body = # User | Updated user object +user = # User | try: # Updated user - api_instance.update_user(username, body) + api_instance.update_user(username, user) except ApiException as e: print("Exception when calling UserApi->updateUser: %s\n" % e)
    @@ -6973,21 +6964,13 @@ except ApiException as e: Name Description - body * + user * -
    +
    @@ -7037,9 +7020,10 @@ $(document).ready(function() {