diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/StaticHtml2Generator.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/StaticHtml2Generator.java
index 3fbfd90e5e04..dba87bf44cbe 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/StaticHtml2Generator.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/StaticHtml2Generator.java
@@ -1,15 +1,24 @@
package io.swagger.codegen.languages;
-import io.swagger.codegen.*;
+import io.swagger.codegen.CliOption;
+import io.swagger.codegen.CodegenConfig;
+import io.swagger.codegen.CodegenConstants;
+import io.swagger.codegen.CodegenOperation;
+import io.swagger.codegen.CodegenParameter;
+import io.swagger.codegen.CodegenResponse;
+import io.swagger.codegen.CodegenType;
+import io.swagger.codegen.DefaultCodegen;
+import io.swagger.codegen.SupportingFile;
+import io.swagger.models.Info;
import io.swagger.models.Model;
import io.swagger.models.Operation;
import io.swagger.models.Swagger;
import io.swagger.models.properties.ArrayProperty;
import io.swagger.models.properties.MapProperty;
import io.swagger.models.properties.Property;
-import io.swagger.models.Info;
import org.apache.commons.lang3.StringUtils;
+
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -113,6 +122,11 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi
List
-
- /petUsage and SDK Samples
-
curl -X post "http://petstore.swagger.io/v2/pet"
- import io.swagger.client.*;
-import io.swagger.client.auth.*;
-import io.swagger.client.model.*;
-import io.swagger.client.api.PetApi;
-
-import java.io.File;
-import java.util.*;
-
-public class PetApiExample {
-
- public static void main(String[] args) {
- ApiClient defaultClient = Configuration.getDefaultApiClient();
-
- // Configure OAuth2 access token for authorization: petstore_auth
- OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
- petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
- PetApi apiInstance = new PetApi();
- Pet body = ; // Pet | Pet object that needs to be added to the store
- try {
- apiInstance.addPet(body);
- } catch (ApiException e) {
- System.err.println("Exception when calling PetApi#addPet");
- e.printStackTrace();
- }
- }
-}
- import io.swagger.client.api.PetApi;
-
-public class PetApiExample {
-
- public static void main(String[] args) {
- PetApi apiInstance = new PetApi();
- Pet body = ; // Pet | Pet object that needs to be added to the store
- try {
- apiInstance.addPet(body);
- } catch (ApiException e) {
- System.err.println("Exception when calling PetApi#addPet");
- e.printStackTrace();
- }
- }
-}
- 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];
-
-// Add a new pet to the store
-[apiInstance addPetWith:body
- completionHandler: ^(NSError* error) {
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
- var SwaggerPetstore = require('swagger_petstore');
-var defaultClient = SwaggerPetstore.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 body = ; // {Pet} Pet object that needs to be added to the store
-
-
-var callback = function(error, data, response) {
- if (error) {
- console.error(error);
- } else {
- console.log('API called successfully.');
- }
-};
-api.addPet(body, callback);
-
- using System;
-using System.Diagnostics;
-using IO.Swagger.Api;
-using IO.Swagger.Client;
-using IO.Swagger.Model;
-
-namespace Example
-{
- public class addPetExample
- {
- public void main()
- {
-
- // Configure OAuth2 access token for authorization: petstore_auth
- Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
-
- var apiInstance = new PetApi();
- var body = new Pet(); // Pet | Pet object that needs to be added to the store
-
- try
- {
- // Add a new pet to the store
- apiInstance.addPet(body);
- }
- catch (Exception e)
- {
- Debug.Print("Exception when calling PetApi.addPet: " + e.Message );
- }
- }
- }
-}
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: petstore_auth
-Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
-
-$api_instance = new Swagger\Client\Api\PetApi();
-$body = ; // Pet | Pet object that needs to be added to the store
-
-try {
- $api_instance->addPet($body);
-} 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)
-