Skip to content

Commit

Permalink
OSCAL schema files, viewer tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-comply0 committed May 21, 2024
1 parent fa1e76f commit fe32498
Show file tree
Hide file tree
Showing 10 changed files with 20,721 additions and 30 deletions.
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.

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>
65 changes: 35 additions & 30 deletions viewer/index.html
Original file line number Diff line number Diff line change
@@ -1,48 +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="32x32" href="/assets/img/favicon-32x32.png"> -->
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicon-16x16.png">
</head>
<body>
<!-- For information about settings: https://rapidocweb.com/api.html -->
<rapi-doc
spec-url="https://raw.githubusercontent.com/EasyDynamics/oscal-rest/RefactorRestAPI/OSCALRestOpenAPI.yaml"
theme = "dark"
heading-text = "OSCAL REST OpenAPI Specification"
render-style = "view"
schema-style = "tree"
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"
>
<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);

<div style="padding: 25px;">
<a href="https://oscal.io"><img src="assets/img/oscalio-logo.svg" style="width:150px;" /></a>
</div>
// 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")

<!-- <div class="collapse navbar-collapse align-items-center" id="navbarSupportedContent">
<table><tr><td><img src="assets/oscalio-logo.svg" style="width:100px;" /></td><td><a class="nav-link" href="https://oscal.io">Home</a></td></tr></table>
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;" />'

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

</rapi-doc>
</body>

</html>

0 comments on commit fe32498

Please sign in to comment.