Skip to content
Merged
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
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# iSHARE OpenAPI specifications
This repository contains OpenAPI specifications for iSHARE roles. The final and most recent versions are published on [Swaggerhub](https://app.swaggerhub.com/apis/iSHARE). This repository is kept for versioning purposes.
# iSHARE OpenAPI Specifications

TO-DO:
- Reconsider all identity provider endpoints and implement in this openapi spec
- Define userinfo_token
This repository contains OpenAPI specifications for iSHARE roles. It publishes the yaml files as github page for reference. The yaml files are also included in the [iSHARE Developer Portal](https://dev.ishare.eu).

For more information about iSHARE, got to [https://www.ishare.eu].
104 changes: 104 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>iSHARE API Documentation</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui.css">
<style>
body {
margin: 0;
padding: 0;
}
#version-selector {
position: fixed;
top: 0;
right: 0;
z-index: 1000;
padding: 15px 20px;
background: #1b1b1b;
color: #fff;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
font-size: 14px;
display: flex;
align-items: center;
border-bottom-left-radius: 4px;
}
#version-selector label {
margin-right: 10px;
color: #fff;
}
#version-selector select {
padding: 6px 10px;
border: 1px solid #41444e;
border-radius: 4px;
background-color: #2b2b2b;
color: #fff;
font-size: 14px;
cursor: pointer;
outline: none;
transition: border-color 0.2s;
}
#version-selector select:hover {
border-color: #4990e2;
}
#version-selector select:focus {
border-color: #4990e2;
box-shadow: 0 0 0 2px rgba(73, 144, 226, 0.2);
}
#version-selector select option {
background-color: #2b2b2b;
color: #fff;
}
</style>
</head>
<body>
<div id="version-selector">
<label for="version">API Version:</label>
<select id="version" onchange="changeVersion()">
<option value="main">Current Version (2.2)</option>
<option value="v2.1">v2.1</option>
<option value="v2.0">v2.0(.1)</option>
<!-- Add more versions as needed -->
</select>
</div>
<div id="swagger-ui"></div>

<script src="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-bundle.js"></script>
<script src="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-standalone-preset.js"></script>
<script>
const versions = {
'main': 'https://raw.githubusercontent.com/iSHAREScheme/openapi/main/ishare_openapi_spec.yaml',
'v2.1': 'https://raw.githubusercontent.com/iSHAREScheme/openapi/v2.1/ishare_openapi_spec.yaml',
'v2.0': 'https://raw.githubusercontent.com/iSHAREScheme/openapi/v2.0/ishare_openapi_spec.yaml'
};

function initSwaggerUI(url) {
window.ui = SwaggerUIBundle({
url: url,
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
});
}

function changeVersion() {
const version = document.getElementById('version').value;
const url = versions[version];
if (url) {
initSwaggerUI(url);
}
}

// Initialize with main version
initSwaggerUI(versions['main']);
</script>
</body>
</html>