Skip to content

Commit

Permalink
Merge pull request PGScatalog#361 from ens-lgil/feature/hide_rest_schema
Browse files Browse the repository at this point in the history
Hide (i.e. collapse) the Schemas by default
  • Loading branch information
fyvon authored May 2, 2024
2 parents 983f7e7 + b347b7f commit 8fd6875
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rest_api/templates/rest_api/rest_doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
presets: [ SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ],
plugins: [ SwaggerUIBundle.plugins.DownloadUrl ],
layout: "StandaloneLayout",
useUnsafeMarkdown: true
useUnsafeMarkdown: true,
defaultModelsExpandDepth: 0
})
// End Swagger UI call region
window.ui = ui
Expand Down Expand Up @@ -148,7 +149,9 @@
models_to_remove = ['Pagination','Error_4XX', 'Demographic'];
for (i=0;i<models_to_remove.length;i++) {
model_elem = document.getElementById("model-"+models_to_remove[i]);
model_elem.parentNode.removeChild(model_elem);
if (model_elem) {
model_elem.parentNode.removeChild(model_elem);
}
}

document.getElementsByTagName("footer")[0].style.display='block';
Expand Down

0 comments on commit 8fd6875

Please sign in to comment.