Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Upgrade to Swagger UI version 3 #1

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/_/ \__,_/____/____/_,___/\____/_/\__/

The open source password manager for teams
Copyright (c) 2020 Passbolt SA
Copyright (c) 2021 Passbolt SA
https://www.passbolt.com


Expand All @@ -26,24 +26,25 @@ GNU Affero General Public License for more details.

## About Passbolt API Specs

This repository contains the specifications for the Passbolt Community Edition
REST API. It uses the OpenAPI format, as a way of standardizing the way the API
This repository contains the specifications for the Passbolt Community Edition
API. It uses the OpenAPI format, as a way of standardizing the way the API
endpoints are described. You can use other open source tools such as
[Insomnia](https://insomnia.rest/download) or
[Swagger UI](https://swagger.io/) to browse this content.

## About Passbolt

Passbolt is an open source password manager for teams. It allows you to
securely share and store credentials. For instance, the wifi password of your
office, the administrator password of a router or your organisation's social
media account passwords, all of them can be secured using passbolt.

Passbolt is different from the other password managers because:
- It is primarily designed for teams and not individuals
- It is free & open source
- It is respectful of privacy
- It is based on OpenPGP, a proven cryptographic standard
- It is easy to use for both novices and IT professionals alike
- It is extensible thanks to its RESTful API
office, the administrator password of a router or your organization's social
media account passwords: all of them can be secured using passbolt.

Passbolt is different from the other password managers because it is:
- primarily designed for teams and not individuals
- free & open source
- respectful of privacy
- based on OpenPGP, a proven cryptographic standard
- easy to use for both novices and IT professionals alike
- extensible thanks to its API

Find out more: [https://www.passbolt.com](https://www.passbolt.com "Passbolt Homepage")
10 changes: 5 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
<style>
Expand Down Expand Up @@ -33,8 +33,8 @@
<body>
<div id="swagger-ui"></div>

<script src="./swagger-ui-bundle.js"> </script>
<script src="./swagger-ui-standalone-preset.js"> </script>
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script>
window.onload = function() {
// Begin Swagger UI call region
Expand All @@ -50,10 +50,10 @@
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})
});
// End Swagger UI call region

window.ui = ui
window.ui = ui;
}
</script>
</body>
Expand Down
30 changes: 19 additions & 11 deletions docs/oauth2-redirect.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!doctype html>
<html lang="en-US">
<body onload="run()">
</body>
</html>
<head>
<title>Swagger UI: OAuth2 Redirect</title>
</head>
<body>
<script>
'use strict';
function run () {
Expand All @@ -17,19 +18,20 @@
qp = location.search.substring(1);
}

arr = qp.split("&")
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
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)
return key === "" ? value : decodeURIComponent(value);
}
) : {}
) : {};

isValid = qp.state === sentState
isValid = qp.state === sentState;

if ((
oauth2.auth.schema.get("flow") === "accessCode"||
oauth2.auth.schema.get("flow") === "authorizationCode"
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({
Expand All @@ -45,7 +47,7 @@
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg
let oauthErrorMsg;
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
Expand All @@ -64,4 +66,10 @@
}
window.close();
}

window.addEventListener('DOMContentLoaded', function () {
run();
});
</script>
</body>
</html>
94 changes: 2 additions & 92 deletions docs/swagger-ui-bundle.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/swagger-ui-es-bundle-core.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/swagger-ui-es-bundle-core.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/swagger-ui-es-bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/swagger-ui-es-bundle.js.map

Large diffs are not rendered by default.

15 changes: 2 additions & 13 deletions docs/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/swagger-ui.css.map

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions docs/swagger-ui.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

Loading