diff --git a/modules/swagger-codegen/src/main/resources/htmlDocs2/index.mustache b/modules/swagger-codegen/src/main/resources/htmlDocs2/index.mustache index 4c3989dc1c27..c07ed7ca1e11 100644 --- a/modules/swagger-codegen/src/main/resources/htmlDocs2/index.mustache +++ b/modules/swagger-codegen/src/main/resources/htmlDocs2/index.mustache @@ -266,7 +266,7 @@ function loadGoogleFontCss() {
-curl -X {{httpMethod}}{{#isApiKey}} -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]"{{/isApiKey}} "{{basePath}}{{path}}{{#hasQueryParams}}?{{#queryParams}}{{^-first}}&{{/-first}}{{paramName}}={{vendorExtensions.x-eg}}{{/queryParams}}{{/hasQueryParams}}"
+curl -X {{httpMethod}}{{#authMethods}}{{#isApiKey}}{{#isKeyInHeader}} -H "{{keyParamName}}: [[apiKey]]" {{/isKeyInHeader}}{{/isApiKey}}{{#isBasic}} -H "Authorization: Basic [[basicHash]]" {{/isBasic}}{{/authMethods}} "{{basePath}}{{path}}{{#hasQueryParams}}?{{#queryParams}}{{^-first}}&{{/-first}}{{paramName}}={{vendorExtensions.x-eg}}{{/queryParams}}{{/hasQueryParams}}"
diff --git a/samples/html2/index.html b/samples/html2/index.html
index 86b9fa7313e7..38c4970ed5ec 100644
--- a/samples/html2/index.html
+++ b/samples/html2/index.html
@@ -2834,7 +2834,7 @@ try {
-curl -X get "http://petstore.swagger.io/v2/pet/{petId}"
+curl -X get -H "api_key: [[apiKey]]" "http://petstore.swagger.io/v2/pet/{petId}"
@@ -5195,7 +5195,7 @@ try {
-curl -X get "http://petstore.swagger.io/v2/store/inventory"
+curl -X get -H "api_key: [[apiKey]]" "http://petstore.swagger.io/v2/store/inventory"
@@ -9921,7 +9921,7 @@ try {