From abffdca441c3a524ac336d66c24e4fa474cd2493 Mon Sep 17 00:00:00 2001 From: weiyang Date: Thu, 6 Apr 2017 14:39:26 +0800 Subject: [PATCH] [Html2] Fix circular references (#5313) * [html2] Fix circular references Signed-off-by: weiyang * [samples][html2] Fix circular references Signed-off-by: weiyang * Optimize code format Signed-off-by: weiyang --- .../main/resources/htmlDocs2/index.mustache | 40 +- .../js_json_schema_ref_parser.mustache | 388 ++ .../htmlDocs2/js_json_stringify_safe.mustache | 27 + .../resources/htmlDocs2/js_jsonref.mustache | 3 - .../main/resources/htmlDocs2/paramB.mustache | 47 +- samples/html2/index.html | 3360 +++++------------ 6 files changed, 1342 insertions(+), 2523 deletions(-) create mode 100644 modules/swagger-codegen/src/main/resources/htmlDocs2/js_json_schema_ref_parser.mustache create mode 100644 modules/swagger-codegen/src/main/resources/htmlDocs2/js_json_stringify_safe.mustache delete mode 100644 modules/swagger-codegen/src/main/resources/htmlDocs2/js_jsonref.mustache diff --git a/modules/swagger-codegen/src/main/resources/htmlDocs2/index.mustache b/modules/swagger-codegen/src/main/resources/htmlDocs2/index.mustache index d2878b33492..89fbb662604 100644 --- a/modules/swagger-codegen/src/main/resources/htmlDocs2/index.mustache +++ b/modules/swagger-codegen/src/main/resources/htmlDocs2/index.mustache @@ -363,20 +363,21 @@ $(document).ready(function() { var schemaWrapper = {{{jsonSchema}}}; var schema = schemaWrapper.schema; - schemaWrapper.definitions = defs; - //console.log(JSON.stringify(schema)) - JsonRefs.resolveRefs(schemaWrapper, { - "depth": 3, - "resolveRemoteRefs": false, - "resolveFileRefs": false - }, function(err, resolved, metadata) { - //console.log(JSON.stringify(resolved)); - var view = new JSONSchemaView(resolved.schema, 3); - $('#responses-{{nickname}}-{{code}}-schema-data').val(JSON.stringify(resolved.schema)); - var result = $('#responses-{{nickname}}-{{code}}-schema-{{code}}'); - result.empty(); - result.append(view.render()); - }); + if (schema.$ref != null) { + schema = defsParser.$refs.get(schema.$ref); + } else { + schemaWrapper.definitions = Object.assign({}, defs); + $RefParser.dereference(schemaWrapper).catch(function(err) { + console.log(err); + }); + } + + //console.log(JSON.stringify(schema)); + var view = new JSONSchemaView(schema, 3); + $('#responses-{{nickname}}-{{code}}-schema-data').val(stringify(schema)); + var result = $('#responses-{{nickname}}-{{code}}-schema-{{code}}'); + result.empty(); + result.append(view.render()); }); @@ -448,8 +449,17 @@ {{>js_jsonformatter}} {{>js_jsonschemaview}} - {{>js_jsonref}} + {{>js_json_schema_ref_parser}} + {{>js_json_stringify_safe}} {{>js_webfontloader}} + diff --git a/modules/swagger-codegen/src/main/resources/htmlDocs2/js_json_stringify_safe.mustache b/modules/swagger-codegen/src/main/resources/htmlDocs2/js_json_stringify_safe.mustache new file mode 100644 index 00000000000..732823d76db --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/htmlDocs2/js_json_stringify_safe.mustache @@ -0,0 +1,27 @@ + diff --git a/modules/swagger-codegen/src/main/resources/htmlDocs2/js_jsonref.mustache b/modules/swagger-codegen/src/main/resources/htmlDocs2/js_jsonref.mustache deleted file mode 100644 index 406ba0003fc..00000000000 --- a/modules/swagger-codegen/src/main/resources/htmlDocs2/js_jsonref.mustache +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/modules/swagger-codegen/src/main/resources/htmlDocs2/paramB.mustache b/modules/swagger-codegen/src/main/resources/htmlDocs2/paramB.mustache index 03aa9ef4d43..7878337b74b 100644 --- a/modules/swagger-codegen/src/main/resources/htmlDocs2/paramB.mustache +++ b/modules/swagger-codegen/src/main/resources/htmlDocs2/paramB.mustache @@ -3,33 +3,24 @@ -
+$(document).ready(function() { + var schemaWrapper = {{{jsonSchema}}}; + var schema = schemaWrapper.schema; + if (schema.$ref != null) { + schema = defsParser.$refs.get(schema.$ref); + } else { + schemaWrapper.definitions = Object.assign({}, defs); + $RefParser.dereference(schemaWrapper).catch(function(err) { + console.log(err); + }); + } + + var view = new JSONSchemaView(schema,2,{isBodyParam: true}); + var result = $('#d2e199_{{nickname}}_{{paramName}}'); + result.empty(); + result.append(view.render()); +}); + +
diff --git a/samples/html2/index.html b/samples/html2/index.html index cb667b55eb6..f4ce1aa2f63 100644 --- a/samples/html2/index.html +++ b/samples/html2/index.html @@ -1006,19 +1006,20 @@

Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X post "http://petstore.swagger.io/v2/pet"
    +
    
    +  curl -X post "http://petstore.swagger.io/v2/pet"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.PetApi;
    +import .PetApi;
     
     import java.io.File;
     import java.util.*;
    @@ -1041,11 +1042,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.PetApi;
    +                            
    
    +  import .PetApi;
     
     public class PetApiExample {
     
    @@ -1059,18 +1063,22 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    Configuration *apiConfig = [Configuration sharedConfig];
    +                              
    
    +  Configuration *apiConfig = [Configuration sharedConfig];
     
     // 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
     
     PetApi *apiInstance = [[PetApi alloc] init];
    @@ -1082,18 +1090,20 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    -var defaultClient = SwaggerPetstore.ApiClient.instance;
    +                              
    
    +  var  = require('');
    +var defaultClient = .ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: petstore_auth
     var petstore_auth = defaultClient.authentications['petstore_auth'];
     petstore_auth.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new SwaggerPetstore.PetApi()
    +var api = new .PetApi()
     
     var body = ; // {Pet} Pet object that needs to be added to the store
     
    @@ -1106,18 +1116,20 @@ 

    Usage and SDK Samples

    } }; api.addPet(body, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -1143,17 +1155,20 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: petstore_auth
    -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +io.swagger.client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new Swagger\Client\Api\PetApi();
    +$api_instance = new io.swagger.client\Api\PetApi();
     $body = ; // Pet | Pet object that needs to be added to the store
     
     try {
    @@ -1161,47 +1176,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling PetApi->addPet: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::PetApi;
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -$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
     
    -eval { 
    -    $api_instance->addPet(body => $body);
    -};
    -if ($@) {
    -    warn "Exception when calling PetApi->addPet: $@\n";
    -}
    -
    - -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -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
    -
    -try: 
    -    # Add a new pet to the store
    -    api_instance.addPet(body)
    -except ApiException as e:
    -    print("Exception when calling PetApi->addPet: %s\n" % e)
    +
    @@ -1266,12 +1242,6 @@

    Parameters

    Responses

    Status: 405 - Invalid input

    - - -
    -
    -
    @@ -1301,19 +1271,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X delete "http://petstore.swagger.io/v2/pet/{petId}"
    +
    
    +  curl -X delete "http://petstore.swagger.io/v2/pet/{petId}"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.PetApi;
    +import .PetApi;
     
     import java.io.File;
     import java.util.*;
    @@ -1337,11 +1308,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.PetApi;
    +                            
    
    +  import .PetApi;
     
     public class PetApiExample {
     
    @@ -1356,18 +1330,22 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    Configuration *apiConfig = [Configuration sharedConfig];
    +                              
    
    +  Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    +
     Long *petId = 789; // Pet id to delete
     String *apiKey = apiKey_example; //  (optional)
     
    @@ -1381,18 +1359,20 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    -var defaultClient = SwaggerPetstore.ApiClient.instance;
    +                              
    
    +  var  = require('');
    +var defaultClient = .ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: petstore_auth
     var petstore_auth = defaultClient.authentications['petstore_auth'];
     petstore_auth.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new SwaggerPetstore.PetApi()
    +var api = new .PetApi()
     
     var petId = 789; // {Long} Pet id to delete
     
    @@ -1408,18 +1388,20 @@ 

    Usage and SDK Samples

    } }; api.deletePet(petId, opts, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -1446,17 +1428,20 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: petstore_auth
    -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +io.swagger.client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new Swagger\Client\Api\PetApi();
    +$api_instance = new io.swagger.client\Api\PetApi();
     $petId = 789; // Long | Pet id to delete
     $apiKey = apiKey_example; // String | 
     
    @@ -1465,49 +1450,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling PetApi->deletePet: ', $e->getMessage(), PHP_EOL; } -?>
    -
    -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::PetApi;
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    -
    -my $api_instance = WWW::SwaggerClient::PetApi->new();
    -my $petId = 789; # Long | Pet id to delete
    -my $apiKey = apiKey_example; # String | 
    -
    -eval { 
    -    $api_instance->deletePet(petId => $petId, apiKey => $apiKey);
    -};
    -if ($@) {
    -    warn "Exception when calling PetApi->deletePet: $@\n";
    -}
    -
    - -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    -
    -# create an instance of the API class
    -api_instance = swagger_client.PetApi()
    -petId = 789 # Long | Pet id to delete
    -apiKey = apiKey_example # String |  (optional)
    -
    -try: 
    -    # Deletes a pet
    -    api_instance.deletePet(petId, apiKey=apiKey)
    -except ApiException as e:
    -    print("Exception when calling PetApi->deletePet: %s\n" % e)
    +
    @@ -1538,7 +1482,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_deletePet_petId'); result.empty(); result.append(view.render()); @@ -1561,7 +1505,7 @@

    Parameters

    Name Description - api_key + apiKey @@ -1578,7 +1522,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_deletePet_apiKey'); result.empty(); result.append(view.render()); @@ -1601,12 +1545,6 @@

    Parameters

    Responses

    Status: 400 - Invalid pet value

    - - -
    -
    -
    @@ -1636,19 +1574,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X get "http://petstore.swagger.io/v2/pet/findByStatus?status="
    +
    
    +  curl -X get "http://petstore.swagger.io/v2/pet/findByStatus?status="
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.PetApi;
    +import .PetApi;
     
     import java.io.File;
     import java.util.*;
    @@ -1672,11 +1611,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.PetApi;
    +                            
    
    +  import .PetApi;
     
     public class PetApiExample {
     
    @@ -1691,18 +1633,22 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    Configuration *apiConfig = [Configuration sharedConfig];
    +                              
    
    +  Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    +
     array[String] *status = ; // Status values that need to be considered for filter
     
     PetApi *apiInstance = [[PetApi alloc] init];
    @@ -1717,18 +1663,20 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    -var defaultClient = SwaggerPetstore.ApiClient.instance;
    +                              
    
    +  var  = require('');
    +var defaultClient = .ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: petstore_auth
     var petstore_auth = defaultClient.authentications['petstore_auth'];
     petstore_auth.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new SwaggerPetstore.PetApi()
    +var api = new .PetApi()
     
     var status = ; // {array[String]} Status values that need to be considered for filter
     
    @@ -1741,18 +1689,20 @@ 

    Usage and SDK Samples

    } }; api.findPetsByStatus(status, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -1779,17 +1729,20 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: petstore_auth
    -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +io.swagger.client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new Swagger\Client\Api\PetApi();
    +$api_instance = new io.swagger.client\Api\PetApi();
     $status = ; // array[String] | Status values that need to be considered for filter
     
     try {
    @@ -1798,49 +1751,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling PetApi->findPetsByStatus: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::PetApi;
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    -
    -my $api_instance = WWW::SwaggerClient::PetApi->new();
    -my $status = []; # array[String] | Status values that need to be considered for filter
    -
    -eval { 
    -    my $result = $api_instance->findPetsByStatus(status => $status);
    -    print Dumper($result);
    -};
    -if ($@) {
    -    warn "Exception when calling PetApi->findPetsByStatus: $@\n";
    -}
    -
    -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    -
    -# create an instance of the API class
    -api_instance = swagger_client.PetApi()
    -status =  # array[String] | Status values that need to be considered for filter
    -
    -try: 
    -    # Finds Pets by status
    -    api_response = api_instance.findPetsByStatus(status)
    -    pprint(api_response)
    -except ApiException as e:
    -    print("Exception when calling PetApi->findPetsByStatus: %s\n" % e)
    +
    @@ -1880,7 +1792,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_findPetsByStatus_status'); result.empty(); result.append(view.render()); @@ -1900,17 +1812,18 @@

    Parameters

    Responses

    Status: 200 - successful operation

    - -
    -
    -
    -
    - +
    -
    - +

    Status: 400 - Invalid status value

    - - -
    -
    -
    @@ -1980,19 +1886,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X get "http://petstore.swagger.io/v2/pet/findByTags?tags="
    +
    
    +  curl -X get "http://petstore.swagger.io/v2/pet/findByTags?tags="
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.PetApi;
    +import .PetApi;
     
     import java.io.File;
     import java.util.*;
    @@ -2016,11 +1923,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.PetApi;
    +                            
    
    +  import .PetApi;
     
     public class PetApiExample {
     
    @@ -2035,18 +1945,22 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    Configuration *apiConfig = [Configuration sharedConfig];
    +                              
    
    +  Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    +
     array[String] *tags = ; // Tags to filter by
     
     PetApi *apiInstance = [[PetApi alloc] init];
    @@ -2061,18 +1975,20 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    -var defaultClient = SwaggerPetstore.ApiClient.instance;
    +                              
    
    +  var  = require('');
    +var defaultClient = .ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: petstore_auth
     var petstore_auth = defaultClient.authentications['petstore_auth'];
     petstore_auth.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new SwaggerPetstore.PetApi()
    +var api = new .PetApi()
     
     var tags = ; // {array[String]} Tags to filter by
     
    @@ -2085,18 +2001,20 @@ 

    Usage and SDK Samples

    } }; api.findPetsByTags(tags, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -2123,17 +2041,20 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: petstore_auth
    -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +io.swagger.client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new Swagger\Client\Api\PetApi();
    +$api_instance = new io.swagger.client\Api\PetApi();
     $tags = ; // array[String] | Tags to filter by
     
     try {
    @@ -2142,49 +2063,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling PetApi->findPetsByTags: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::PetApi;
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
     
    -my $api_instance = WWW::SwaggerClient::PetApi->new();
    -my $tags = []; # array[String] | Tags to filter by
    -
    -eval { 
    -    my $result = $api_instance->findPetsByTags(tags => $tags);
    -    print Dumper($result);
    -};
    -if ($@) {
    -    warn "Exception when calling PetApi->findPetsByTags: $@\n";
    -}
    -
    - -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    -
    -# create an instance of the API class
    -api_instance = swagger_client.PetApi()
    -tags =  # array[String] | Tags to filter by
    -
    -try: 
    -    # Finds Pets by tags
    -    api_response = api_instance.findPetsByTags(tags)
    -    pprint(api_response)
    -except ApiException as e:
    -    print("Exception when calling PetApi->findPetsByTags: %s\n" % e)
    +
    @@ -2222,7 +2102,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_findPetsByTags_tags'); result.empty(); result.append(view.render()); @@ -2242,17 +2122,18 @@

    Parameters

    Responses

    Status: 200 - successful operation

    - -
    -
    -
    -
    - +
    -
    - +

    Status: 400 - Invalid tag value

    - - -
    -
    -
    @@ -2322,19 +2196,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X get -H "api_key: [[apiKey]]" "http://petstore.swagger.io/v2/pet/{petId}"
    +
    
    +  curl -X get -H "api_key: [[apiKey]]"  "http://petstore.swagger.io/v2/pet/{petId}"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.PetApi;
    +import .PetApi;
     
     import java.io.File;
     import java.util.*;
    @@ -2360,11 +2235,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.PetApi;
    +                            
    
    +  import .PetApi;
     
     public class PetApiExample {
     
    @@ -2379,20 +2257,24 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    Configuration *apiConfig = [Configuration sharedConfig];
    +                              
    
    +  Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure API key authorization: (authentication scheme: api_key)
     [apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
     // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
     //[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
     
    +
     Long *petId = 789; // ID of pet to return
     
     PetApi *apiInstance = [[PetApi alloc] init];
    @@ -2407,12 +2289,14 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    -var defaultClient = SwaggerPetstore.ApiClient.instance;
    +                              
    
    +  var  = require('');
    +var defaultClient = .ApiClient.instance;
     
     // Configure API key authorization: api_key
     var api_key = defaultClient.authentications['api_key'];
    @@ -2420,7 +2304,7 @@ 

    Usage and SDK Samples

    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix['api_key'] = "Token" -var api = new SwaggerPetstore.PetApi() +var api = new .PetApi() var petId = 789; // {Long} ID of pet to return @@ -2433,18 +2317,20 @@

    Usage and SDK Samples

    } }; api.getPetById(petId, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -2473,19 +2359,22 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure API key authorization: api_key
    -Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
    +io.swagger.client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
     // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    -// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');
    +// io.swagger.client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');
     
    -$api_instance = new Swagger\Client\Api\PetApi();
    +$api_instance = new io.swagger.client\Api\PetApi();
     $petId = 789; // Long | ID of pet to return
     
     try {
    @@ -2494,53 +2383,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling PetApi->getPetById: ', $e->getMessage(), PHP_EOL; } -?>
    -
    -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::PetApi;
    -
    -# Configure API key authorization: api_key
    -$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
    -# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    -#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";
    -
    -my $api_instance = WWW::SwaggerClient::PetApi->new();
    -my $petId = 789; # Long | ID of pet to return
    -
    -eval { 
    -    my $result = $api_instance->getPetById(petId => $petId);
    -    print Dumper($result);
    -};
    -if ($@) {
    -    warn "Exception when calling PetApi->getPetById: $@\n";
    -}
    -
    - -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# Configure API key authorization: api_key
    -swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
    -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    -# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'
    -
    -# create an instance of the API class
    -api_instance = swagger_client.PetApi()
    -petId = 789 # Long | ID of pet to return
    -
    -try: 
    -    # Find pet by ID
    -    api_response = api_instance.getPetById(petId)
    -    pprint(api_response)
    -except ApiException as e:
    -    print("Exception when calling PetApi->getPetById: %s\n" % e)
    +
    @@ -2571,7 +2415,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_getPetById_petId'); result.empty(); result.append(view.render()); @@ -2595,17 +2439,18 @@

    Parameters

    Responses

    Status: 200 - successful operation

    - + +
    +
    +
    -
    -
    -
    -
    - +
    -
    - +

    Status: 400 - Invalid ID supplied

    - - -
    -
    -

    Status: 404 - Pet not found

    - - -
    -
    -

    @@ -2680,19 +2512,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X put "http://petstore.swagger.io/v2/pet"
    +
    
    +  curl -X put "http://petstore.swagger.io/v2/pet"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.PetApi;
    +import .PetApi;
     
     import java.io.File;
     import java.util.*;
    @@ -2715,11 +2548,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.PetApi;
    +                            
    
    +  import .PetApi;
     
     public class PetApiExample {
     
    @@ -2733,18 +2569,22 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    Configuration *apiConfig = [Configuration sharedConfig];
    +                              
    
    +  Configuration *apiConfig = [Configuration sharedConfig];
     
     // 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
     
     PetApi *apiInstance = [[PetApi alloc] init];
    @@ -2756,18 +2596,20 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    -var defaultClient = SwaggerPetstore.ApiClient.instance;
    +                              
    
    +  var  = require('');
    +var defaultClient = .ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: petstore_auth
     var petstore_auth = defaultClient.authentications['petstore_auth'];
     petstore_auth.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new SwaggerPetstore.PetApi()
    +var api = new .PetApi()
     
     var body = ; // {Pet} Pet object that needs to be added to the store
     
    @@ -2780,18 +2622,20 @@ 

    Usage and SDK Samples

    } }; api.updatePet(body, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -2817,17 +2661,20 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: petstore_auth
    -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +io.swagger.client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new Swagger\Client\Api\PetApi();
    +$api_instance = new io.swagger.client\Api\PetApi();
     $body = ; // Pet | Pet object that needs to be added to the store
     
     try {
    @@ -2835,47 +2682,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling PetApi->updatePet: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::PetApi;
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -$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
    -
    -eval { 
    -    $api_instance->updatePet(body => $body);
    -};
    -if ($@) {
    -    warn "Exception when calling PetApi->updatePet: $@\n";
    -}
    -
    - -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -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
    -
    -try: 
    -    # Update an existing pet
    -    api_instance.updatePet(body)
    -except ApiException as e:
    -    print("Exception when calling PetApi->updatePet: %s\n" % e)
    +
    @@ -2940,28 +2748,10 @@

    Parameters

    Responses

    Status: 400 - Invalid ID supplied

    - - -
    -
    -

    Status: 404 - Pet not found

    - - -
    -
    -

    Status: 405 - Validation exception

    - - -
    -
    -

    @@ -2991,19 +2781,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X post "http://petstore.swagger.io/v2/pet/{petId}"
    +
    
    +  curl -X post "http://petstore.swagger.io/v2/pet/{petId}"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.PetApi;
    +import .PetApi;
     
     import java.io.File;
     import java.util.*;
    @@ -3028,11 +2819,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.PetApi;
    +                            
    
    +  import .PetApi;
     
     public class PetApiExample {
     
    @@ -3048,18 +2842,22 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    Configuration *apiConfig = [Configuration sharedConfig];
    +                              
    
    +  Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    +
     Long *petId = 789; // ID of pet that needs to be updated
     String *name = name_example; // Updated name of the pet (optional)
     String *status = status_example; // Updated status of the pet (optional)
    @@ -3075,18 +2873,20 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    -var defaultClient = SwaggerPetstore.ApiClient.instance;
    +                              
    
    +  var  = require('');
    +var defaultClient = .ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: petstore_auth
     var petstore_auth = defaultClient.authentications['petstore_auth'];
     petstore_auth.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new SwaggerPetstore.PetApi()
    +var api = new .PetApi()
     
     var petId = 789; // {Long} ID of pet that needs to be updated
     
    @@ -3103,18 +2903,20 @@ 

    Usage and SDK Samples

    } }; api.updatePetWithForm(petId, opts, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -3142,17 +2944,20 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: petstore_auth
    -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +io.swagger.client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new Swagger\Client\Api\PetApi();
    +$api_instance = new io.swagger.client\Api\PetApi();
     $petId = 789; // Long | ID of pet that needs to be updated
     $name = name_example; // String | Updated name of the pet
     $status = status_example; // String | Updated status of the pet
    @@ -3162,51 +2967,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling PetApi->updatePetWithForm: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::PetApi;
     
    -# Configure OAuth2 access token for authorization: petstore_auth
    -$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    -
    -my $api_instance = WWW::SwaggerClient::PetApi->new();
    -my $petId = 789; # Long | ID of pet that needs to be updated
    -my $name = name_example; # String | Updated name of the pet
    -my $status = status_example; # String | Updated status of the pet
    -
    -eval { 
    -    $api_instance->updatePetWithForm(petId => $petId, name => $name, status => $status);
    -};
    -if ($@) {
    -    warn "Exception when calling PetApi->updatePetWithForm: $@\n";
    -}
    -
    - -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    -
    -# create an instance of the API class
    -api_instance = swagger_client.PetApi()
    -petId = 789 # Long | ID of pet that needs to be updated
    -name = name_example # String | Updated name of the pet (optional)
    -status = status_example # String | Updated status of the pet (optional)
    -
    -try: 
    -    # Updates a pet in the store with form data
    -    api_instance.updatePetWithForm(petId, name=name, status=status)
    -except ApiException as e:
    -    print("Exception when calling PetApi->updatePetWithForm: %s\n" % e)
    +
    @@ -3237,7 +2999,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_updatePetWithForm_petId'); result.empty(); result.append(view.render()); @@ -3280,7 +3042,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_updatePetWithForm_name'); result.empty(); result.append(view.render()); @@ -3313,7 +3075,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_updatePetWithForm_status'); result.empty(); result.append(view.render()); @@ -3334,12 +3096,6 @@

    Parameters

    Responses

    Status: 405 - Invalid input

    - - -
    -
    -
    @@ -3369,19 +3125,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X post "http://petstore.swagger.io/v2/pet/{petId}/uploadImage"
    +
    
    +  curl -X post "http://petstore.swagger.io/v2/pet/{petId}/uploadImage"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.PetApi;
    +import .PetApi;
     
     import java.io.File;
     import java.util.*;
    @@ -3398,7 +3155,7 @@ 

    Usage and SDK Samples

    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 = /path/to/file.txt; // file | file to upload try { ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); System.out.println(result); @@ -3407,11 +3164,14 @@

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.PetApi;
    +                            
    
    +  import .PetApi;
     
     public class PetApiExample {
     
    @@ -3419,7 +3179,7 @@ 

    Usage and SDK Samples

    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 = /path/to/file.txt; // file | file to upload try { ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); System.out.println(result); @@ -3428,21 +3188,25 @@

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    Configuration *apiConfig = [Configuration sharedConfig];
    +                              
    
    +  Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    +
     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 = /path/to/file.txt; // file to upload (optional)
     
     PetApi *apiInstance = [[PetApi alloc] init];
     
    @@ -3458,24 +3222,26 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    -var defaultClient = SwaggerPetstore.ApiClient.instance;
    +                              
    
    +  var  = require('');
    +var defaultClient = .ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: petstore_auth
     var petstore_auth = defaultClient.authentications['petstore_auth'];
     petstore_auth.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new SwaggerPetstore.PetApi()
    +var api = new .PetApi()
     
     var petId = 789; // {Long} ID of pet to update
     
     var opts = { 
       'additionalMetadata': additionalMetadata_example, // {String} Additional data to pass to server
    -  'file': /path/to/file.txt // {File} file to upload
    +  'file': /path/to/file.txt // {file} file to upload
     };
     
     var callback = function(error, data, response) {
    @@ -3486,18 +3252,20 @@ 

    Usage and SDK Samples

    } }; api.uploadFile(petId, opts, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -3512,7 +3280,7 @@ 

    Usage and SDK Samples

    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 = new file(); // file | file to upload (optional) try { @@ -3526,20 +3294,23 @@

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: petstore_auth
    -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +io.swagger.client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new Swagger\Client\Api\PetApi();
    +$api_instance = new io.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 = /path/to/file.txt; // file | file to upload
     
     try {
         $result = $api_instance->uploadFile($petId, $additionalMetadata, $file);
    @@ -3547,53 +3318,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling PetApi->uploadFile: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::PetApi;
     
    -# Configure OAuth2 access token for authorization: petstore_auth
    -$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
    -
    -eval { 
    -    my $result = $api_instance->uploadFile(petId => $petId, additionalMetadata => $additionalMetadata, file => $file);
    -    print Dumper($result);
    -};
    -if ($@) {
    -    warn "Exception when calling PetApi->uploadFile: $@\n";
    -}
    -
    - -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# Configure OAuth2 access token for authorization: petstore_auth
    -swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    -
    -# create an instance of the API class
    -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)
    -
    -try: 
    -    # uploads an image
    -    api_response = api_instance.uploadFile(petId, additionalMetadata=additionalMetadata, file=file)
    -    pprint(api_response)
    -except ApiException as e:
    -    print("Exception when calling PetApi->uploadFile: %s\n" % e)
    +
    @@ -3624,7 +3350,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_uploadFile_petId'); result.empty(); result.append(view.render()); @@ -3667,7 +3393,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_uploadFile_additionalMetadata'); result.empty(); result.append(view.render()); @@ -3700,7 +3426,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_uploadFile_file'); result.empty(); result.append(view.render()); @@ -3721,17 +3447,18 @@

    Parameters

    Responses

    Status: 200 - successful operation

    - + +
    +
    +
    -
    -
    -
    -
    - +
    -
    - +

    @@ -3793,19 +3519,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X delete "http://petstore.swagger.io/v2/store/order/{orderId}"
    +
    
    +  curl -X delete "http://petstore.swagger.io/v2/store/order/{orderId}"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.StoreApi;
    +import .StoreApi;
     
     import java.io.File;
     import java.util.*;
    @@ -3823,11 +3550,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.StoreApi;
    +                            
    
    +  import .StoreApi;
     
     public class StoreApiExample {
     
    @@ -3841,14 +3571,18 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    String *orderId = orderId_example; // ID of the order that needs to be deleted
    +                              
    
    +  
    +String *orderId = orderId_example; // ID of the order that needs to be deleted
     
     StoreApi *apiInstance = [[StoreApi alloc] init];
     
    @@ -3859,13 +3593,15 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    +                              
    
    +  var  = require('');
     
    -var api = new SwaggerPetstore.StoreApi()
    +var api = new .StoreApi()
     
     var orderId = orderId_example; // {String} ID of the order that needs to be deleted
     
    @@ -3878,18 +3614,20 @@ 

    Usage and SDK Samples

    } }; api.deleteOrder(orderId, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -3912,14 +3650,17 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
    -$api_instance = new Swagger\Client\Api\StoreApi();
    +$api_instance = new io.swagger.client\Api\StoreApi();
     $orderId = orderId_example; // String | ID of the order that needs to be deleted
     
     try {
    @@ -3927,41 +3668,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling StoreApi->deleteOrder: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::StoreApi;
    -
    -my $api_instance = WWW::SwaggerClient::StoreApi->new();
    -my $orderId = orderId_example; # String | ID of the order that needs to be deleted
    -
    -eval { 
    -    $api_instance->deleteOrder(orderId => $orderId);
    -};
    -if ($@) {
    -    warn "Exception when calling StoreApi->deleteOrder: $@\n";
    -}
    -
    -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# create an instance of the API class
    -api_instance = swagger_client.StoreApi()
    -orderId = orderId_example # String | ID of the order that needs to be deleted
    -
    -try: 
    -    # Delete purchase order by ID
    -    api_instance.deleteOrder(orderId)
    -except ApiException as e:
    -    print("Exception when calling StoreApi->deleteOrder: %s\n" % e)
    +
    @@ -3991,7 +3699,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_deleteOrder_orderId'); result.empty(); result.append(view.render()); @@ -4015,20 +3723,8 @@

    Parameters

    Responses

    Status: 400 - Invalid ID supplied

    - - -
    -
    -

    Status: 404 - Order not found

    - - -
    -
    -

    @@ -4058,19 +3754,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X get -H "api_key: [[apiKey]]" "http://petstore.swagger.io/v2/store/inventory"
    +
    
    +  curl -X get -H "api_key: [[apiKey]]"  "http://petstore.swagger.io/v2/store/inventory"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.StoreApi;
    +import .StoreApi;
     
     import java.io.File;
     import java.util.*;
    @@ -4095,11 +3792,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.StoreApi;
    +                            
    
    +  import .StoreApi;
     
     public class StoreApiExample {
     
    @@ -4113,14 +3813,17 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    Configuration *apiConfig = [Configuration sharedConfig];
    +                              
    
    +  Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure API key authorization: (authentication scheme: api_key)
     [apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
    @@ -4128,6 +3831,7 @@ 

    Usage and SDK Samples

    //[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"]; + StoreApi *apiInstance = [[StoreApi alloc] init]; // Returns pet inventories by status @@ -4140,12 +3844,14 @@

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    -var defaultClient = SwaggerPetstore.ApiClient.instance;
    +                              
    
    +  var  = require('');
    +var defaultClient = .ApiClient.instance;
     
     // Configure API key authorization: api_key
     var api_key = defaultClient.authentications['api_key'];
    @@ -4153,7 +3859,7 @@ 

    Usage and SDK Samples

    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix['api_key'] = "Token" -var api = new SwaggerPetstore.StoreApi() +var api = new .StoreApi() var callback = function(error, data, response) { if (error) { @@ -4163,18 +3869,20 @@

    Usage and SDK Samples

    } }; api.getInventory(callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -4202,19 +3910,22 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure API key authorization: api_key
    -Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
    +io.swagger.client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
     // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    -// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');
    +// io.swagger.client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');
     
    -$api_instance = new Swagger\Client\Api\StoreApi();
    +$api_instance = new io.swagger.client\Api\StoreApi();
     
     try {
         $result = $api_instance->getInventory();
    @@ -4222,51 +3933,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling StoreApi->getInventory: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::StoreApi;
    -
    -# Configure API key authorization: api_key
    -$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
    -# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    -#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";
    -
    -my $api_instance = WWW::SwaggerClient::StoreApi->new();
    -
    -eval { 
    -    my $result = $api_instance->getInventory();
    -    print Dumper($result);
    -};
    -if ($@) {
    -    warn "Exception when calling StoreApi->getInventory: $@\n";
    -}
    -
    -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# Configure API key authorization: api_key
    -swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
    -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    -# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'
    -
    -# create an instance of the API class
    -api_instance = swagger_client.StoreApi()
    -
    -try: 
    -    # Returns pet inventories by status
    -    api_response = api_instance.getInventory()
    -    pprint(api_response)
    -except ApiException as e:
    -    print("Exception when calling StoreApi->getInventory: %s\n" % e)
    +
    @@ -4280,17 +3948,18 @@

    Parameters

    Responses

    Status: 200 - successful operation

    - -
    -
    -
    -
    - +
    -
    - +
    @@ -4353,19 +4021,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X get "http://petstore.swagger.io/v2/store/order/{orderId}"
    +
    
    +  curl -X get "http://petstore.swagger.io/v2/store/order/{orderId}"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.StoreApi;
    +import .StoreApi;
     
     import java.io.File;
     import java.util.*;
    @@ -4384,11 +4053,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.StoreApi;
    +                            
    
    +  import .StoreApi;
     
     public class StoreApiExample {
     
    @@ -4403,14 +4075,18 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    Long *orderId = 789; // ID of pet that needs to be fetched
    +                              
    
    +  
    +Long *orderId = 789; // ID of pet that needs to be fetched
     
     StoreApi *apiInstance = [[StoreApi alloc] init];
     
    @@ -4424,13 +4100,15 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    +                              
    
    +  var  = require('');
     
    -var api = new SwaggerPetstore.StoreApi()
    +var api = new .StoreApi()
     
     var orderId = 789; // {Long} ID of pet that needs to be fetched
     
    @@ -4443,18 +4121,20 @@ 

    Usage and SDK Samples

    } }; api.getOrderById(orderId, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -4478,14 +4158,17 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
    -$api_instance = new Swagger\Client\Api\StoreApi();
    +$api_instance = new io.swagger.client\Api\StoreApi();
     $orderId = 789; // Long | ID of pet that needs to be fetched
     
     try {
    @@ -4494,43 +4177,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling StoreApi->getOrderById: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::StoreApi;
    -
    -my $api_instance = WWW::SwaggerClient::StoreApi->new();
    -my $orderId = 789; # Long | ID of pet that needs to be fetched
    -
    -eval { 
    -    my $result = $api_instance->getOrderById(orderId => $orderId);
    -    print Dumper($result);
    -};
    -if ($@) {
    -    warn "Exception when calling StoreApi->getOrderById: $@\n";
    -}
    -
    -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# create an instance of the API class
    -api_instance = swagger_client.StoreApi()
    -orderId = 789 # Long | ID of pet that needs to be fetched
    -
    -try: 
    -    # Find purchase order by ID
    -    api_response = api_instance.getOrderById(orderId)
    -    pprint(api_response)
    -except ApiException as e:
    -    print("Exception when calling StoreApi->getOrderById: %s\n" % e)
    +
    @@ -4554,8 +4202,8 @@

    Parameters

    "description" : "ID of pet that needs to be fetched", "required" : true, "type" : "integer", - "maximum" : 5, - "minimum" : 1, + "maximum" : 5.0, + "minimum" : 1.0, "format" : "int64" }; var schema = schemaWrapper; @@ -4563,7 +4211,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_getOrderById_orderId'); result.empty(); result.append(view.render()); @@ -4587,17 +4235,18 @@

    Parameters

    Responses

    Status: 200 - successful operation

    - -
    -
    -
    -
    - +
    -
    - +

    Status: 400 - Invalid ID supplied

    - - -
    -
    -

    Status: 404 - Order not found

    - - -
    -
    -
    @@ -4672,19 +4308,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X post "http://petstore.swagger.io/v2/store/order"
    +
    
    +  curl -X post "http://petstore.swagger.io/v2/store/order"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.StoreApi;
    +import .StoreApi;
     
     import java.io.File;
     import java.util.*;
    @@ -4703,11 +4340,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.StoreApi;
    +                            
    
    +  import .StoreApi;
     
     public class StoreApiExample {
     
    @@ -4722,14 +4362,18 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    Order *body = ; // order placed for purchasing the pet
    +                              
    
    +  
    +Order *body = ; // order placed for purchasing the pet
     
     StoreApi *apiInstance = [[StoreApi alloc] init];
     
    @@ -4743,13 +4387,15 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    +                              
    
    +  var  = require('');
     
    -var api = new SwaggerPetstore.StoreApi()
    +var api = new .StoreApi()
     
     var body = ; // {Order} order placed for purchasing the pet
     
    @@ -4762,18 +4408,20 @@ 

    Usage and SDK Samples

    } }; api.placeOrder(body, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -4797,14 +4445,17 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
    -$api_instance = new Swagger\Client\Api\StoreApi();
    +$api_instance = new io.swagger.client\Api\StoreApi();
     $body = ; // Order | order placed for purchasing the pet
     
     try {
    @@ -4813,43 +4464,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling StoreApi->placeOrder: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -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
    -
    -eval { 
    -    my $result = $api_instance->placeOrder(body => $body);
    -    print Dumper($result);
    -};
    -if ($@) {
    -    warn "Exception when calling StoreApi->placeOrder: $@\n";
    -}
    -
    - -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# create an instance of the API class
    -api_instance = swagger_client.StoreApi()
    -body =  # Order | order placed for purchasing the pet
    -
    -try: 
    -    # Place an order for a pet
    -    api_response = api_instance.placeOrder(body)
    -    pprint(api_response)
    -except ApiException as e:
    -    print("Exception when calling StoreApi->placeOrder: %s\n" % e)
    +
    @@ -4914,17 +4530,18 @@

    Parameters

    Responses

    Status: 200 - successful operation

    - -
    -
    -
    -
    - +
    -
    - +

    Status: 400 - Invalid Order

    - - -
    -
    -
    @@ -4994,19 +4604,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X post "http://petstore.swagger.io/v2/user"
    +
    
    +  curl -X post "http://petstore.swagger.io/v2/user"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.UserApi;
    +import .UserApi;
     
     import java.io.File;
     import java.util.*;
    @@ -5024,11 +4635,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.UserApi;
    +                            
    
    +  import .UserApi;
     
     public class UserApiExample {
     
    @@ -5042,14 +4656,18 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    User *body = ; // Created user object
    +                              
    
    +  
    +User *body = ; // Created user object
     
     UserApi *apiInstance = [[UserApi alloc] init];
     
    @@ -5060,13 +4678,15 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    +                              
    
    +  var  = require('');
     
    -var api = new SwaggerPetstore.UserApi()
    +var api = new .UserApi()
     
     var body = ; // {User} Created user object
     
    @@ -5079,18 +4699,20 @@ 

    Usage and SDK Samples

    } }; api.createUser(body, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -5113,14 +4735,17 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
    -$api_instance = new Swagger\Client\Api\UserApi();
    +$api_instance = new io.swagger.client\Api\UserApi();
     $body = ; // User | Created user object
     
     try {
    @@ -5128,41 +4753,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling UserApi->createUser: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -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
    -
    -eval { 
    -    $api_instance->createUser(body => $body);
    -};
    -if ($@) {
    -    warn "Exception when calling UserApi->createUser: $@\n";
    -}
    -
    -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# create an instance of the API class
    -api_instance = swagger_client.UserApi()
    -body =  # User | Created user object
    -
    -try: 
    -    # Create user
    -    api_instance.createUser(body)
    -except ApiException as e:
    -    print("Exception when calling UserApi->createUser: %s\n" % e)
    +
    @@ -5225,13 +4817,7 @@

    Parameters

    Responses

    -

    Status: default - successful operation

    - - - -
    -
    +

    Status: 0 - successful operation

    @@ -5262,19 +4848,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X post "http://petstore.swagger.io/v2/user/createWithArray"
    +
    
    +  curl -X post "http://petstore.swagger.io/v2/user/createWithArray"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.UserApi;
    +import .UserApi;
     
     import java.io.File;
     import java.util.*;
    @@ -5292,11 +4879,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.UserApi;
    +                            
    
    +  import .UserApi;
     
     public class UserApiExample {
     
    @@ -5310,14 +4900,18 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    array[User] *body = ; // List of user object
    +                              
    
    +  
    +array[User] *body = ; // List of user object
     
     UserApi *apiInstance = [[UserApi alloc] init];
     
    @@ -5328,13 +4922,15 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    +                              
    
    +  var  = require('');
     
    -var api = new SwaggerPetstore.UserApi()
    +var api = new .UserApi()
     
     var body = ; // {array[User]} List of user object
     
    @@ -5347,18 +4943,20 @@ 

    Usage and SDK Samples

    } }; api.createUsersWithArrayInput(body, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -5381,14 +4979,17 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
    -$api_instance = new Swagger\Client\Api\UserApi();
    +$api_instance = new io.swagger.client\Api\UserApi();
     $body = ; // array[User] | List of user object
     
     try {
    @@ -5396,41 +4997,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling UserApi->createUsersWithArrayInput: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -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
    -
    -eval { 
    -    $api_instance->createUsersWithArrayInput(body => $body);
    -};
    -if ($@) {
    -    warn "Exception when calling UserApi->createUsersWithArrayInput: $@\n";
    -}
    -
    - -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# create an instance of the API class
    -api_instance = swagger_client.UserApi()
    -body =  # array[User] | List of user object
    -
    -try: 
    -    # Creates list of users with given input array
    -    api_instance.createUsersWithArrayInput(body)
    -except ApiException as e:
    -    print("Exception when calling UserApi->createUsersWithArrayInput: %s\n" % e)
    +
    @@ -5496,13 +5064,7 @@

    Parameters

    Responses

    -

    Status: default - successful operation

    - - - -
    -
    +

    Status: 0 - successful operation

    @@ -5533,19 +5095,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X post "http://petstore.swagger.io/v2/user/createWithList"
    +
    
    +  curl -X post "http://petstore.swagger.io/v2/user/createWithList"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.UserApi;
    +import .UserApi;
     
     import java.io.File;
     import java.util.*;
    @@ -5563,11 +5126,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.UserApi;
    +                            
    
    +  import .UserApi;
     
     public class UserApiExample {
     
    @@ -5581,14 +5147,18 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    array[User] *body = ; // List of user object
    +                              
    
    +  
    +array[User] *body = ; // List of user object
     
     UserApi *apiInstance = [[UserApi alloc] init];
     
    @@ -5599,13 +5169,15 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    +                              
    
    +  var  = require('');
     
    -var api = new SwaggerPetstore.UserApi()
    +var api = new .UserApi()
     
     var body = ; // {array[User]} List of user object
     
    @@ -5618,18 +5190,20 @@ 

    Usage and SDK Samples

    } }; api.createUsersWithListInput(body, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -5652,14 +5226,17 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
    -$api_instance = new Swagger\Client\Api\UserApi();
    +$api_instance = new io.swagger.client\Api\UserApi();
     $body = ; // array[User] | List of user object
     
     try {
    @@ -5667,41 +5244,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling UserApi->createUsersWithListInput: ', $e->getMessage(), PHP_EOL; } -?>
    -
    -
    -
    use Data::Dumper;
    -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
    -
    -eval { 
    -    $api_instance->createUsersWithListInput(body => $body);
    -};
    -if ($@) {
    -    warn "Exception when calling UserApi->createUsersWithListInput: $@\n";
    -}
    -
    - -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# create an instance of the API class
    -api_instance = swagger_client.UserApi()
    -body =  # array[User] | List of user object
    -
    -try: 
    -    # Creates list of users with given input array
    -    api_instance.createUsersWithListInput(body)
    -except ApiException as e:
    -    print("Exception when calling UserApi->createUsersWithListInput: %s\n" % e)
    +
    @@ -5767,13 +5311,7 @@

    Parameters

    Responses

    -

    Status: default - successful operation

    - - - -
    -
    +

    Status: 0 - successful operation

    @@ -5804,19 +5342,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X delete "http://petstore.swagger.io/v2/user/{username}"
    +
    
    +  curl -X delete "http://petstore.swagger.io/v2/user/{username}"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.UserApi;
    +import .UserApi;
     
     import java.io.File;
     import java.util.*;
    @@ -5834,11 +5373,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.UserApi;
    +                            
    
    +  import .UserApi;
     
     public class UserApiExample {
     
    @@ -5852,14 +5394,18 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    String *username = username_example; // The name that needs to be deleted
    +                              
    
    +  
    +String *username = username_example; // The name that needs to be deleted
     
     UserApi *apiInstance = [[UserApi alloc] init];
     
    @@ -5870,13 +5416,15 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    +                              
    
    +  var  = require('');
     
    -var api = new SwaggerPetstore.UserApi()
    +var api = new .UserApi()
     
     var username = username_example; // {String} The name that needs to be deleted
     
    @@ -5889,18 +5437,20 @@ 

    Usage and SDK Samples

    } }; api.deleteUser(username, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -5923,14 +5473,17 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
    -$api_instance = new Swagger\Client\Api\UserApi();
    +$api_instance = new io.swagger.client\Api\UserApi();
     $username = username_example; // String | The name that needs to be deleted
     
     try {
    @@ -5938,41 +5491,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling UserApi->deleteUser: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -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 deleted
    -
    -eval { 
    -    $api_instance->deleteUser(username => $username);
    -};
    -if ($@) {
    -    warn "Exception when calling UserApi->deleteUser: $@\n";
    -}
    -
    -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -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 deleted
    -
    -try: 
    -    # Delete user
    -    api_instance.deleteUser(username)
    -except ApiException as e:
    -    print("Exception when calling UserApi->deleteUser: %s\n" % e)
    +
    @@ -6002,7 +5522,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_deleteUser_username'); result.empty(); result.append(view.render()); @@ -6026,20 +5546,8 @@

    Parameters

    Responses

    Status: 400 - Invalid username supplied

    - - -
    -
    -

    Status: 404 - User not found

    - - -
    -
    -
    @@ -6069,19 +5577,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X get "http://petstore.swagger.io/v2/user/{username}"
    +
    
    +  curl -X get "http://petstore.swagger.io/v2/user/{username}"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.UserApi;
    +import .UserApi;
     
     import java.io.File;
     import java.util.*;
    @@ -6100,11 +5609,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.UserApi;
    +                            
    
    +  import .UserApi;
     
     public class UserApiExample {
     
    @@ -6119,14 +5631,18 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    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];
     
    @@ -6140,13 +5656,15 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    +                              
    
    +  var  = require('');
     
    -var api = new SwaggerPetstore.UserApi()
    +var api = new .UserApi()
     
     var username = username_example; // {String} The name that needs to be fetched. Use user1 for testing. 
     
    @@ -6159,18 +5677,20 @@ 

    Usage and SDK Samples

    } }; api.getUserByName(username, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -6194,14 +5714,17 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
    -$api_instance = new Swagger\Client\Api\UserApi();
    +$api_instance = new io.swagger.client\Api\UserApi();
     $username = username_example; // String | The name that needs to be fetched. Use user1 for testing. 
     
     try {
    @@ -6210,43 +5733,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling UserApi->getUserByName: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -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. 
    -
    -eval { 
    -    my $result = $api_instance->getUserByName(username => $username);
    -    print Dumper($result);
    -};
    -if ($@) {
    -    warn "Exception when calling UserApi->getUserByName: $@\n";
    -}
    -
    -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -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. 
    -
    -try: 
    -    # Get user by user name
    -    api_response = api_instance.getUserByName(username)
    -    pprint(api_response)
    -except ApiException as e:
    -    print("Exception when calling UserApi->getUserByName: %s\n" % e)
    +
    @@ -6276,7 +5764,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_getUserByName_username'); result.empty(); result.append(view.render()); @@ -6300,17 +5788,18 @@

    Parameters

    Responses

    Status: 200 - successful operation

    - -
    -
    -
    -
    - +
    -
    - +

    Status: 400 - Invalid username supplied

    - - -
    -
    -

    Status: 404 - User not found

    - - -
    -
    -
    @@ -6385,19 +5861,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X get "http://petstore.swagger.io/v2/user/login?username=&password="
    +
    
    +  curl -X get "http://petstore.swagger.io/v2/user/login?username=&password="
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.UserApi;
    +import .UserApi;
     
     import java.io.File;
     import java.util.*;
    @@ -6417,11 +5894,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.UserApi;
    +                            
    
    +  import .UserApi;
     
     public class UserApiExample {
     
    @@ -6437,14 +5917,18 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    String *username = username_example; // The user name for login
    +                              
    
    +  
    +String *username = username_example; // The user name for login
     String *password = password_example; // The password for login in clear text
     
     UserApi *apiInstance = [[UserApi alloc] init];
    @@ -6460,13 +5944,15 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    +                              
    
    +  var  = require('');
     
    -var api = new SwaggerPetstore.UserApi()
    +var api = new .UserApi()
     
     var username = username_example; // {String} The user name for login
     
    @@ -6481,18 +5967,20 @@ 

    Usage and SDK Samples

    } }; api.loginUser(username, password, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -6517,14 +6005,17 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
    -$api_instance = new Swagger\Client\Api\UserApi();
    +$api_instance = new io.swagger.client\Api\UserApi();
     $username = username_example; // String | The user name for login
     $password = password_example; // String | The password for login in clear text
     
    @@ -6534,45 +6025,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling UserApi->loginUser: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::UserApi;
     
    -my $api_instance = WWW::SwaggerClient::UserApi->new();
    -my $username = username_example; # String | The user name for login
    -my $password = password_example; # String | The password for login in clear text
    -
    -eval { 
    -    my $result = $api_instance->loginUser(username => $username, password => $password);
    -    print Dumper($result);
    -};
    -if ($@) {
    -    warn "Exception when calling UserApi->loginUser: $@\n";
    -}
    -
    - -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# create an instance of the API class
    -api_instance = swagger_client.UserApi()
    -username = username_example # String | The user name for login
    -password = password_example # String | The password for login in clear text
    -
    -try: 
    -    # Logs user into the system
    -    api_response = api_instance.loginUser(username, password)
    -    pprint(api_response)
    -except ApiException as e:
    -    print("Exception when calling UserApi->loginUser: %s\n" % e)
    +
    @@ -6606,7 +6060,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_loginUser_username'); result.empty(); result.append(view.render()); @@ -6639,7 +6093,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_loginUser_password'); result.empty(); result.append(view.render()); @@ -6659,20 +6113,18 @@

    Parameters

    Responses

    Status: 200 - successful operation

    - -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - -
    NameTypeFormatDescription
    X-Rate-LimitIntegerint32calls per hour allowed by the user
    X-Expires-AfterDatedate-timedate in UTC when toekn expires
    +
    -
    - +

    Status: 400 - Invalid username/password supplied

    - - -
    -
    -
    @@ -6773,19 +6196,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X get "http://petstore.swagger.io/v2/user/logout"
    +
    
    +  curl -X get "http://petstore.swagger.io/v2/user/logout"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.UserApi;
    +import .UserApi;
     
     import java.io.File;
     import java.util.*;
    @@ -6802,11 +6226,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.UserApi;
    +                            
    
    +  import .UserApi;
     
     public class UserApiExample {
     
    @@ -6819,7 +6246,9 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    
    +  
    +
     UserApi *apiInstance = [[UserApi alloc] init];
     
     // Logs out current logged in user session
    @@ -6836,13 +6267,15 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    +                              
    
    +  var  = require('');
     
    -var api = new SwaggerPetstore.UserApi()
    +var api = new .UserApi()
     
     var callback = function(error, data, response) {
       if (error) {
    @@ -6852,18 +6285,20 @@ 

    Usage and SDK Samples

    } }; api.logoutUser(callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -6885,53 +6320,25 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
    -$api_instance = new Swagger\Client\Api\UserApi();
    +$api_instance = new io.swagger.client\Api\UserApi();
     
     try {
         $api_instance->logoutUser();
     } catch (Exception $e) {
         echo 'Exception when calling UserApi->logoutUser: ', $e->getMessage(), PHP_EOL;
     }
    -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -use WWW::SwaggerClient::UserApi;
    -
    -my $api_instance = WWW::SwaggerClient::UserApi->new();
    -
    -eval { 
    -    $api_instance->logoutUser();
    -};
    -if ($@) {
    -    warn "Exception when calling UserApi->logoutUser: $@\n";
    -}
    -
    -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -from pprint import pprint
    -
    -# create an instance of the API class
    -api_instance = swagger_client.UserApi()
    -
    -try: 
    -    # Logs out current logged in user session
    -    api_instance.logoutUser()
    -except ApiException as e:
    -    print("Exception when calling UserApi->logoutUser: %s\n" % e)
    +
    @@ -6943,13 +6350,7 @@

    Parameters

    Responses

    -

    Status: default - successful operation

    - - - -
    -
    +

    Status: 0 - successful operation

    @@ -6980,19 +6381,20 @@

    Usage and SDK Samples

  • C#
  • PHP
  • -
  • Perl
  • -
  • Python
  • -
    curl -X put "http://petstore.swagger.io/v2/user/{username}"
    +
    
    +  curl -X put "http://petstore.swagger.io/v2/user/{username}"
    +  
    -
    import io.swagger.client.*;
    +                            
    
    +  import io.swagger.client.*;
     import io.swagger.client.auth.*;
     import io.swagger.client.model.*;
    -import io.swagger.client.api.UserApi;
    +import .UserApi;
     
     import java.io.File;
     import java.util.*;
    @@ -7011,11 +6413,14 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    import io.swagger.client.api.UserApi;
    +                            
    
    +  import .UserApi;
     
     public class UserApiExample {
     
    @@ -7030,14 +6435,18 @@ 

    Usage and SDK Samples

    e.printStackTrace(); } } -}
    +} + +
    -
    String *username = username_example; // name that need to be deleted
    +                              
    
    +  
    +String *username = username_example; // name that need to be deleted
     User *body = ; // Updated user object
     
     UserApi *apiInstance = [[UserApi alloc] init];
    @@ -7050,13 +6459,15 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; -
    + +
    -
    var SwaggerPetstore = require('swagger_petstore');
    +                              
    
    +  var  = require('');
     
    -var api = new SwaggerPetstore.UserApi()
    +var api = new .UserApi()
     
     var username = username_example; // {String} name that need to be deleted
     
    @@ -7071,18 +6482,20 @@ 

    Usage and SDK Samples

    } }; api.updateUser(username, body, callback); -
    + +
    -
    using System;
    +                              
    
    +  using System;
     using System.Diagnostics;
    -using IO.Swagger.Api;
    -using IO.Swagger.Client;
    -using IO.Swagger.Model;
    +using .Api;
    +using .Client;
    +using ;
     
     namespace Example
     {
    @@ -7106,14 +6519,17 @@ 

    Usage and SDK Samples

    } } } -}
    +} + +
    -
    <?php
    +                              
    
    +  
     require_once(__DIR__ . '/vendor/autoload.php');
     
    -$api_instance = new Swagger\Client\Api\UserApi();
    +$api_instance = new io.swagger.client\Api\UserApi();
     $username = username_example; // String | name that need to be deleted
     $body = ; // User | Updated user object
     
    @@ -7122,43 +6538,8 @@ 

    Usage and SDK Samples

    } catch (Exception $e) { echo 'Exception when calling UserApi->updateUser: ', $e->getMessage(), PHP_EOL; } -?>
    -
    - -
    -
    use Data::Dumper;
    -use WWW::SwaggerClient::Configuration;
    -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
    -
    -eval { 
    -    $api_instance->updateUser(username => $username, body => $body);
    -};
    -if ($@) {
    -    warn "Exception when calling UserApi->updateUser: $@\n";
    -}
    -
    -
    -
    from __future__ import print_statement
    -import time
    -import swagger_client
    -from swagger_client.rest import ApiException
    -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
    -
    -try: 
    -    # Updated user
    -    api_instance.updateUser(username, body)
    -except ApiException as e:
    -    print("Exception when calling UserApi->updateUser: %s\n" % e)
    +
    @@ -7188,7 +6569,7 @@

    Parameters

    - var view = new JSONSchemaView(schema,1); + var view = new JSONSchemaView(schema,0); var result = $('#d2e199_updateUser_username'); result.empty(); result.append(view.render()); @@ -7263,20 +6644,8 @@

    Parameters

    Responses

    Status: 400 - Invalid user supplied

    - - -
    -
    -

    Status: 404 - User not found

    - - -
    -
    -
    @@ -7291,978 +6660,15 @@

    Status: 404 - User not found

    http://www.apache.org/licenses/LICENSE-2.0.html
    +
    +
    + Generated 2017-04-06T03:19:44.348Z +
    +
    -