mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
25 lines
846 B
Plaintext
25 lines
846 B
Plaintext
<%= nonced_javascript_include_tag variable_asset_path("openapi-explorer.js"), skip_pipeline: true %>
|
|
|
|
<%= nonced_javascript_tag do %>
|
|
(function() {
|
|
// set openapi-explorer parent width and height explicitly to prevent them being set to 100vw/100vh by the script
|
|
// which leads to double scroll bars
|
|
// https://github.com/Authress-Engineering/openapi-explorer/blob/49d4d32de6fd7b14a8f5f95fbfefa8cd72e72587/src/openapi-explorer.js#L191-L196
|
|
const contentBody = document.getElementById('content-body');
|
|
if (contentBody) {
|
|
contentBody.style.width = 'auto';
|
|
contentBody.style.height = 'auto';
|
|
}
|
|
})();
|
|
<% end %>
|
|
|
|
<%=
|
|
content_tag(
|
|
"openapi-explorer",
|
|
"",
|
|
"spec-url": api_v3_paths.api_spec,
|
|
"server-url": api_v3_paths.root_path,
|
|
"nav-bg-color": color_by_variable("main-menu-bg-color")
|
|
)
|
|
%>
|