Skip to content

Commit bf77474

Browse files
authored
use HTTPS for Petstore by default (#4652)
1 parent 8416b04 commit bf77474

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL maintainer="fehguy"
44

55
ENV VERSION "v2.2.10"
66
ENV FOLDER "swagger-ui-2.2.10"
7-
ENV API_URL "http://petstore.swagger.io/v2/swagger.json"
7+
ENV API_URL "https://petstore.swagger.io/v2/swagger.json"
88
ENV API_URLS ""
99
ENV API_KEY "**None**"
1010
ENV OAUTH_CLIENT_ID "**None**"

dev-helpers/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
window["SwaggerUIStandalonePreset"] = window["swagger-ui-standalone-preset"]
4444
// Build a system
4545
const ui = SwaggerUIBundle({
46-
url: "http://petstore.swagger.io/v2/swagger.json",
46+
url: "https://petstore.swagger.io/v2/swagger.json",
4747
dom_id: '#swagger-ui',
4848
presets: [
4949
SwaggerUIBundle.presets.apis,

dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
// Build a system
4343
const ui = SwaggerUIBundle({
44-
url: "http://petstore.swagger.io/v2/swagger.json",
44+
url: "https://petstore.swagger.io/v2/swagger.json",
4545
dom_id: '#swagger-ui',
4646
deepLinking: true,
4747
presets: [

docker-run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ fi
3838
if [[ -f $SWAGGER_JSON ]]; then
3939
cp -s $SWAGGER_JSON $NGINX_ROOT
4040
REL_PATH="./$(basename $SWAGGER_JSON)"
41-
sed -i "s|http://petstore.swagger.io/v2/swagger.json|$REL_PATH|g" $INDEX_FILE
41+
sed -i "s|https://petstore.swagger.io/v2/swagger.json|$REL_PATH|g" $INDEX_FILE
4242
sed -i "s|http://example.com/api|$REL_PATH|g" $INDEX_FILE
4343
else
44-
sed -i "s|http://petstore.swagger.io/v2/swagger.json|$API_URL|g" $INDEX_FILE
44+
sed -i "s|https://petstore.swagger.io/v2/swagger.json|$API_URL|g" $INDEX_FILE
4545
sed -i "s|http://example.com/api|$API_URL|g" $INDEX_FILE
4646
fi
4747

@@ -59,7 +59,7 @@ if [[ -n "$API_URLS" ]]; then
5959
fi
6060

6161
# replace the PORT that nginx listens on if PORT is supplied
62-
if [[ -n "${PORT}" ]]; then
62+
if [[ -n "${PORT}" ]]; then
6363
sed -i "s|8080|${PORT}|g" /etc/nginx/nginx.conf
6464
fi
6565

docs/customization/custom-layout.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const OperationsLayoutPlugin = () => {
4040
// Provide the plugin to Swagger-UI, and select OperationsLayout
4141
// as the layout for Swagger-UI
4242
SwaggerUI({
43-
url: "http://petstore.swagger.io/v2/swagger.json",
43+
url: "https://petstore.swagger.io/v2/swagger.json",
4444
plugins: [ OperationsLayoutPlugin ],
4545
layout: "OperationsLayout"
4646
})
@@ -85,7 +85,7 @@ const AugmentingLayoutPlugin = () => {
8585
// Provide the plugin to Swagger-UI, and select AugmentingLayout
8686
// as the layout for Swagger-UI
8787
SwaggerUI({
88-
url: "http://petstore.swagger.io/v2/swagger.json",
88+
url: "https://petstore.swagger.io/v2/swagger.json",
8989
plugins: [ AugmentingLayoutPlugin ],
9090
layout: "AugmentingLayout"
9191
})

docs/usage/cors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can verify CORS support with one of three techniques:
2121
- Curl your API and inspect the headers. For instance:
2222

2323
```bash
24-
$ curl -I "http://petstore.swagger.io/v2/swagger.json"
24+
$ curl -I "https://petstore.swagger.io/v2/swagger.json"
2525
HTTP/1.1 200 OK
2626
Date: Sat, 31 Jan 2015 23:05:44 GMT
2727
Access-Control-Allow-Origin: *

docs/usage/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ you could do something like this:
4444
var SwaggerUIBundle = require('swagger-ui-dist').SwaggerUIBundle
4545

4646
const ui = SwaggerUIBundle({
47-
url: "http://petstore.swagger.io/v2/swagger.json",
47+
url: "https://petstore.swagger.io/v2/swagger.json",
4848
dom_id: '#swagger-ui',
4949
presets: [
5050
SwaggerUIBundle.presets.apis,

swagger-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
url: "http://petstore.swagger.io/v2/swagger.json"
2+
url: "https://petstore.swagger.io/v2/swagger.json"
33
dom_id: "#swagger-ui"
44
validatorUrl: "https://online.swagger.io/validator"
55
oauth2RedirectUrl: "http://localhost:3200/oauth2-redirect.html"

test/e2e/helpers/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
window["SwaggerUIStandalonePreset"] = window["swagger-ui-standalone-preset"]
7676
// Build a system
7777
const ui = SwaggerUIBundle({
78-
url: "http://petstore.swagger.io/v2/swagger.json",
78+
url: "https://petstore.swagger.io/v2/swagger.json",
7979
dom_id: '#swagger-ui',
8080
presets: [
8181
SwaggerUIBundle.presets.apis,

0 commit comments

Comments
 (0)