swagger ui 제거

This commit is contained in:
현성필
2023-10-17 14:16:25 +09:00
parent 8860f5d234
commit 463a5de628
15 changed files with 0 additions and 297 deletions
@@ -1,36 +0,0 @@
// Define the CustomSwaggerClient class in the global scope
var CustomSwaggerClient = function () {
// Set up any necessary configuration here
};
CustomSwaggerClient.prototype.makeRequest = function (req) {
// Use the fetch API or a similar library to make the request
// Return a Promise that resolves with the response data
console.log(req);
return req;
};
CustomSwaggerClient.prototype.makeResponse = function (res) {
// Use the fetch API or a similar library to make the request
// Return a Promise that resolves with the response data
console.log(res);
console.log(111);
return res;
};
CustomSwaggerClient.prototype.authenticate = function (req) {
// Add any necessary authentication headers to the request
};
CustomSwaggerClient.prototype.setBasePath = function (basePath) {
// Set the base URL for your API
};
CustomSwaggerClient.prototype.setApiKey = function (apiKey) {
// Set the API key as a header
};
CustomSwaggerClient.prototype.setAccessToken = function (accessToken) {
// Set the access token as a header
};
@@ -1,64 +0,0 @@
"use strict";
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
// From: https://raw.githubusercontent.com/chilts/umd-template/master/template.js
;
(function (f) {
// module name and requires
var name = 'SamplePlugin';
var requires = []; // CommonJS
if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") {
module.exports = f.apply(null, requires.map(function (r) {
return require(r);
})); // RequireJS
} else if (typeof define === "function" && define.amd) {
define(requires, f); // <script>
} else {
var g;
if (typeof window !== "undefined") {
g = window;
} else if (typeof global !== "undefined") {
g = global;
} else if (typeof self !== "undefined") {
g = self;
} else {
g = this;
}
g[name] = f.apply(null, requires.map(function (r) {
return g[r];
}));
}
})(function () {
return function (system) {
var originalFetch = system.fn.fetch;
return {
fn: {
fetch : function (req) {
if(!req.loadSpec) {
req.headers["original-url"] = req.url;
req.url = "http://localhost:8080/api/call-api" ;
}
return originalFetch(req);
}
}
}
};
});
@@ -1,79 +0,0 @@
<!doctype html>
<html lang="en-US">
<head>
<title>Swagger UI: OAuth2 Redirect</title>
</head>
<body>
<script>
'use strict';
function run () {
var oauth2 = window.opener.swaggerUIRedirectOauth2;
var sentState = oauth2.state;
var redirectUrl = oauth2.redirectUrl;
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1).replace('?', '&');
} else {
qp = location.search.substring(1);
}
arr = qp.split("&");
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
qp = qp ? JSON.parse('{' + arr.join() + '}',
function (key, value) {
return key === "" ? value : decodeURIComponent(value);
}
) : {};
isValid = qp.state === sentState;
if ((
oauth2.auth.schema.get("flow") === "accessCode" ||
oauth2.auth.schema.get("flow") === "authorizationCode" ||
oauth2.auth.schema.get("flow") === "authorization_code"
) && !oauth2.auth.code) {
if (!isValid) {
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
});
}
if (qp.code) {
delete oauth2.state;
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg;
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
(qp.error_uri ? "More info: "+qp.error_uri : "");
}
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
});
}
} else {
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
}
window.close();
}
if (document.readyState !== 'loading') {
run();
} else {
document.addEventListener('DOMContentLoaded', function () {
run();
});
}
</script>
</body>
</html>
@@ -1,79 +0,0 @@
{
"swagger": "2.0",
"host": "gateway.eactive.co.kr",
"basePath": "/",
"schemes": [
"https",
"http"
],
"paths": {
"/sample_api_url": {
"post": {
"summary": "API 이름은 여기에",
"description": "API 설명은 여기에",
"consumes": [
"application/json"
],
"tags": [
"API"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Pet object that needs to be added to the store",
"required": true,
"schema": {
"$ref": "#/definitions/Pet"
}
}
],
"responses": {
"405": {
"description": "Invalid input"
},
"200": {
"description": "Success"
}
}
}
}
},
"definitions": {
"Pet": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"username": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"phone": {
"type": "string"
},
"userStatus": {
"type": "integer",
"format": "int32",
"description": "User Status"
}
}
}
}
}
@@ -1,20 +0,0 @@
window.onload = function() {
//<editor-fold desc="Changeable Configuration Block">
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
window.ui = SwaggerUIBundle({
url: "https://petstore.swagger.io/v2/swagger.json",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
});
//</editor-fold>
};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long