Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
bytesleo committed Apr 5, 2018
1 parent 83ce0fb commit 783c620
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 78 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

> RESTful API Nodejs designed for horizontal scalability with support for cluster, based on Swagger, Redis, JWT, Passport, Socket.io, Express, MongoDB.
<a href="https://www.codacy.com/app/kevoj/nodetomic-api-swagger?utm_source=github.com&utm_medium=referral&utm_content=kevoj/nodetomic-api-swagger&utm_campaign=Badge_Grade" ><img src="http://i.imgur.com/n98gapy.png"></a>
<a href="https://www.codacy.com/app/kevoj/nodetomic-api-swagger?utm_source=github.com&utm_medium=referral&utm_content=kevoj/nodetomic-api-swagger&utm_campaign=Badge_Grade" ><img src="https://i.imgur.com/0ag9bJ6.png"></a>

### Technologies

Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodetomic-api-swagger",
"version": "3.4.0",
"version": "3.4.1",
"description": "RESTful API Nodejs designed for horizontal scalability with support for cluster, based on Swagger, Redis, JWT, Passport, Socket.io, Express, MongoDB.",
"main": "src/app.js",
"repository": {
Expand Down Expand Up @@ -56,16 +56,16 @@
"dependencies": {
"bcrypt": "^1.0.3",
"body-parser": "^1.18.2",
"chalk": "^2.3.0",
"compression": "^1.7.1",
"chalk": "^2.3.2",
"compression": "^1.7.2",
"cookie-parser": "^1.4.3",
"cors": "^2.8.4",
"express": "^4.16.2",
"express": "^4.16.3",
"express-easy-helper": "^1.1.0",
"express-session": "^1.15.6",
"helmet": "^3.9.0",
"helmet": "^3.12.0",
"method-override": "^2.3.10",
"mongoose": "4.13.6",
"mongoose": "5.0.13",
"mongoose-paginate": "^5.0.3",
"passport": "^0.4.0",
"passport-bitbucket": "^2.0.0",
Expand All @@ -74,19 +74,19 @@
"passport-google-oauth": "^1.0.0",
"passport-local": "^1.0.0",
"passport-twitter": "^1.0.4",
"pm2": "^2.8.0",
"redis-jwt": "^1.3.0",
"role-calc": "^1.1.4",
"serve-favicon": "^2.4.5",
"socket.io": "^2.0.4",
"pm2": "^2.10.2",
"redis-jwt": "^1.4.0",
"role-calc": "^1.1.6",
"serve-favicon": "^2.5.0",
"socket.io": "^2.1.0",
"socket.io-redis": "^5.2.0",
"swagger-jsdoc": "^1.9.7",
"swagger-tools": "^0.10.3"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.3",
"babel-eslint": "^8.2.2",
"babel-plugin-transform-flow-comments": "^6.22.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
Expand All @@ -96,21 +96,21 @@
"babel-preset-stage-2": "^6.24.1",
"babel-register": "^6.26.0",
"concurrently": "^3.5.1",
"eslint": "^4.12.1",
"eslint": "^4.19.1",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.0",
"gulp-json-editor": "^2.2.1",
"gulp-minifier": "^0.2.2",
"gulp-babel": "^7.0.1",
"gulp-json-editor": "^2.3.0",
"gulp-minifier": "^1.2.2",
"gulp-rename": "^1.2.2",
"gulp-rimraf": "^0.2.1",
"mocha": "^4.0.1",
"gulp-rimraf": "^0.2.2",
"mocha": "^5.0.5",
"morgan": "^1.9.0",
"nodemon": "^1.12.1",
"nodemon": "^1.17.3",
"npm-delay": "^1.0.4",
"run-sequence": "^2.2.0"
"run-sequence": "^2.2.1"
},
"engines": {
"node": "^6.2.2",
"npm": "^3.9.5"
}
}
}
52 changes: 26 additions & 26 deletions src/lib/swagger/ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>API - UI</title>
<title>Swagger UI</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
Expand Down Expand Up @@ -72,38 +72,38 @@
<script>
window.onload = function() {

//Nodetomic
// var url = new URL(location.href)
// var v = url.searchParams.get("version")
//var path = location.origin + '/' + v + '/swagger.json';
var path = location.origin + '/swagger.json'
// Nodetomic
// var url = new URL(location.href)
// var v = url.searchParams.get("version")
// var path = location.origin + '/' + v + '/swagger.json';
var path = location.origin + '/swagger.json'

function rename() {
function rename() {
document.querySelector(".link span").innerHTML = 'Nodetomic Api Swagger'
document.querySelector(".link").setAttribute("href", "/")
var elements = document.getElementsByClassName('download-url-wrapper')
while (elements.length > 0) {
elements[0].parentNode.removeChild(elements[0])
}
}

// Build a system
var ui = SwaggerUIBundle({
url: path,
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})

window.ui = ui
rename()
}

// Build a system
const ui = SwaggerUIBundle({
url: path,
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})

window.ui = ui
rename()
}
</script>
</body>
Expand Down
9 changes: 8 additions & 1 deletion src/lib/swagger/ui/oauth2-redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,18 @@
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: "Authorization failed: no accessCode received from the server"
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
});
}
} else {
Expand Down
34 changes: 14 additions & 20 deletions src/lib/swagger/ui/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lib/swagger/ui/swagger-ui-bundle.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/lib/swagger/ui/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lib/swagger/ui/swagger-ui-standalone-preset.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/lib/swagger/ui/swagger-ui.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/lib/swagger/ui/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lib/swagger/ui/swagger-ui.js.map

Large diffs are not rendered by default.

0 comments on commit 783c620

Please sign in to comment.