From 4fa40a3e2031c21de77b01ce8e789c9c4160aa60 Mon Sep 17 00:00:00 2001 From: seokho-son Date: Sat, 17 Aug 2024 19:11:09 +0900 Subject: [PATCH 1/2] Change style --- redoc-swagger-integration.html | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/redoc-swagger-integration.html b/redoc-swagger-integration.html index 619e0af..3060b2c 100644 --- a/redoc-swagger-integration.html +++ b/redoc-swagger-integration.html @@ -120,9 +120,12 @@ SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ], + docExpansion: "list", layout: "BaseLayout", deepLinking: true, // Enable deep linking - displayOperationId: true, // Display operationId in Swagger UI + //displayOperationId: true, // Display operationId in Swagger UI + tagsSorter: "alpha", + operationsSorter: "alpha", requestInterceptor: (request) => { request.headers['Authorization'] = authHeader; return request; @@ -139,20 +142,31 @@ Redoc.init(spec, { scrollYOffset: 50, hideLoading: true, + suppressWarnings: true, + requiredPropsFirst: true, + sortPropsAlphabetically: true, + expandResponses: "200", + // pathInMiddlePanel: true, theme: { - colors: { - primary: { - main: '#dd5522' - } - }, typography: { - fontFamily: 'Arial, sans-serif', - fontSize: '18px', + fontFamily: '"Arial", Helvetica, Open Sans, sans-serif', headings: { - fontFamily: 'Arial, sans-serif' + fontFamily: '"Arial", "Roboto Condensed", sans-serif' + }, + code: { + fontFamily: '"Arial", "Courier", monospace' } }, + rightPanel: { + width: '40%', + backgroundColor: '#6c757d', + textColor: '#f8f9fa' + }, + codeSample: { + backgroundColor: '#343a40' + } } + }, document.getElementById('redoc-container')); console.log('Redoc initialized'); From 0aedc1b207d90fae040e378c2d342020fad4735e Mon Sep 17 00:00:00 2001 From: seokho-son Date: Sat, 17 Aug 2024 19:14:44 +0900 Subject: [PATCH 2/2] Change file name --- Dockerfile | 2 +- index.html | 4 ++-- package.json | 2 +- redoc-swagger-integration.html => redoc-swagger.html | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename redoc-swagger-integration.html => redoc-swagger.html (100%) diff --git a/Dockerfile b/Dockerfile index 96dec45..433bdfb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ COPY --from=builder /app/dist ./dist COPY --from=builder /app/img ./dist/img COPY --from=builder /app/index.html ./ COPY --from=builder /app/index.js ./ -COPY --from=builder /app/redoc-swagger-integration.html ./ +COPY --from=builder /app/redoc-swagger.html ./ COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/package-lock.json ./package-lock.json COPY --from=builder /app/package.json ./package.json diff --git a/index.html b/index.html index 7d72d3d..16d233a 100644 --- a/index.html +++ b/index.html @@ -227,7 +227,7 @@ Show all Clouds Hide/Show MCI Clear Map - API Dashboard + API Dashboard Toggle Map/API @@ -235,7 +235,7 @@
- +
diff --git a/package.json b/package.json index 7cf1aeb..de89420 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "scripts": { "start": "parcel -p 1324 --host 0.0.0.0 index.html", - "build": "echo 'Removing temporal cache files' && rm -rf dist/* .parcel-cache/* && mkdir -p dist/img/ && cp -r img/ dist/ && cp redoc-swagger-integration.html dist/ && parcel build --public-url . index.html" + "build": "echo 'Removing temporal cache files' && rm -rf dist/* .parcel-cache/* && mkdir -p dist/img/ && cp -r img/ dist/ && cp redoc-swagger.html dist/ && parcel build --public-url . index.html" }, "description": "MapUI Client for CB-Tumblebug (display multi-cloud infra service)", "repository": { diff --git a/redoc-swagger-integration.html b/redoc-swagger.html similarity index 100% rename from redoc-swagger-integration.html rename to redoc-swagger.html