Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSCAL Schema and Viewer Tweaks #95

Merged
merged 3 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
3,014 changes: 3,014 additions & 0 deletions oscal-schema/v1.1.2/oscal_assessment-plan_schema.json

Large diffs are not rendered by default.

3,167 changes: 3,167 additions & 0 deletions oscal-schema/v1.1.2/oscal_assessment-results_schema.json

Large diffs are not rendered by default.

1,083 changes: 1,083 additions & 0 deletions oscal-schema/v1.1.2/oscal_catalog_schema.json

Large diffs are not rendered by default.

5,143 changes: 5,143 additions & 0 deletions oscal-schema/v1.1.2/oscal_complete_schema.json

Large diffs are not rendered by default.

1,638 changes: 1,638 additions & 0 deletions oscal-schema/v1.1.2/oscal_component_schema.json

Large diffs are not rendered by default.

3,095 changes: 3,095 additions & 0 deletions oscal-schema/v1.1.2/oscal_poam_schema.json

Large diffs are not rendered by default.

1,349 changes: 1,349 additions & 0 deletions oscal-schema/v1.1.2/oscal_profile_schema.json

Large diffs are not rendered by default.

2,155 changes: 2,155 additions & 0 deletions oscal-schema/v1.1.2/oscal_ssp_schema.json

Large diffs are not rendered by default.

Binary file added viewer/assets/img/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added viewer/assets/img/favicon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions viewer/assets/img/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions viewer/assets/img/oscalio-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions viewer/example.html.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!doctype html>
<!-- For information about settings: https://rapidocweb.com/api.html -->
<html>
<head>
<title>OSCAL REST OpenAPI Specification</title>
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 characters -->
<!-- <script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script> -->
<script type="text/javascript" src="rapidoc-min.js"></script>
<link rel="icon" type="image/svg+xml" href="assets/img/favicon.svg">
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicon-16x16.png">
</head>
<body>
<rapi-doc
spec-url=""
theme = "dark"
heading-text = "OSCAL REST OpenAPI Specification"
render-style = "view"
schema-style = "table"
schema-expand-level = 2
default-schema-tab = "schema"
show-header = 'false'
show-info = 'true'
allow-try = "false"
allow-authentication ='false'
allow-server-selection = 'false'
allow-api-list-style-selection ='false'
bg-color="#001131"
text-color = "#ffffff"
header-color = "#001131"
primary-color = "#00BDE3"
load-fonts = "true"
regular-font = "Arial"
mono-font = "Roboto Mono"
layout = "column"
>

<div style="padding: 25px;">
<a href="https://oscal.io"><img src="assets/img/oscalio-logo.svg" style="width:150px;" />
</div>
</rapi-doc>
</body>
</html>
53 changes: 53 additions & 0 deletions viewer/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!doctype html>
<!-- For information about settings: https://rapidocweb.com/api.html -->
<html>
<head>
<title>OSCAL REST OpenAPI Specification</title>
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 characters -->
<!-- <script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script> -->
<script type="text/javascript" src="rapidoc-min.js"></script>
<link rel="icon" type="image/svg+xml" href="assets/img/favicon.svg">
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicon-16x16.png">
</head>
<body>
<script>
var url_string = window.location.href; //window.location.href
var url = new URL(url_string);
var api_url = url.searchParams.get("url");
console.log(api_url);

// var body = document.getElementsByTagName("body")
var rapidoc = document.createElement("rapi-doc");
rapidoc.setAttribute("spec-url", api_url);
rapidoc.setAttribute("theme", "dark")
rapidoc.setAttribute("heading-text", "OSCAL REST OpenAPI Specification")
rapidoc.setAttribute("render-style", "view")
rapidoc.setAttribute("schema-style", "table") // allowed values: table, tree
rapidoc.setAttribute("schema-expand-level", "2")
rapidoc.setAttribute("default-schema-tab", "schema") // allowed values: schema, example
rapidoc.setAttribute("show-header", "false")
rapidoc.setAttribute("show-info", "true")
rapidoc.setAttribute("allow-try", "false")
rapidoc.setAttribute("allow-authentication", "false")
rapidoc.setAttribute("allow-server-selection", "false")
rapidoc.setAttribute("allow-api-list-style-selection", "false")
rapidoc.setAttribute("bg-color", "#001131")
rapidoc.setAttribute("text-color", "#ffffff")
rapidoc.setAttribute("header-color", "#001131")
rapidoc.setAttribute("primary-color", "#00BDE3")
rapidoc.setAttribute("load-fonts", "true")
rapidoc.setAttribute("regular-font", "Arial")
rapidoc.setAttribute("mono-font", "Roboto Mono")
rapidoc.setAttribute("layout", "column")

var div = document.createElement("div");
div.setAttribute("style", "padding: 25px;")
div.innerHTML = '<a href="https://oscal.io"><img src="assets/img/oscalio-logo.svg" style="width:150px;" />'

rapidoc.append(div)
document.body.append(rapidoc)
</script>

</body>

</html>
3,895 changes: 3,895 additions & 0 deletions viewer/rapidoc-min.js

Large diffs are not rendered by default.