Skip to content

Commit

Permalink
swagger: improve layout
Browse files Browse the repository at this point in the history
and fix lint
  • Loading branch information
neolynx committed Nov 28, 2024
1 parent c759c62 commit 4052973
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/packages.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package api

import (
_ "github.com/aptly-dev/aptly/deb" // for swagger
"github.com/gin-gonic/gin"
_ "github.com/aptly-dev/aptly/deb"
)

// @Summary Show packages
Expand Down
2 changes: 1 addition & 1 deletion docs/Mirrors.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Remote Repository Mirrors
# Manage Remote Repository Mirrors
<div>
Manage mirrors of remote Debian repositories.

Expand Down
2 changes: 1 addition & 1 deletion docs/Packages.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Search Packages
# Search Package Collection
<div>
Perform operations on the whole collection of packages in apty database.
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Publish.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Publish repositories and mirrors
# Publish Repositories and Mirrors
<div>

Publish snapshot or local repo as Debian repository which could be served by HTTP/FTP/rsync server. Repository is signed by user's key with GnuPG. Key should be created beforehand (see section GPG Keys below). Published repository could be consumed directly by apt.
Expand Down
2 changes: 1 addition & 1 deletion docs/Snapshots.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Manage repository and mirror Snapshots
# Manage Snapshots of Repositories and Mirrors
<div>
Snapshot is a fixed state of remote repository mirror or local repository. Internally snapshot is list of references to packages. Snapshot is immutable, i.e. it can’t be changed since it has been created. Snapshots could be merged, filtered, individual packages could be pulled, snapshot could be verified for missing dependencies. Finally, snapshots could be published as repositories.
</div>
2 changes: 1 addition & 1 deletion docs/Status.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aptly Status Information
# Status Information
<div>
Various status information.

Expand Down
17 changes: 17 additions & 0 deletions docs/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
align-self: flex-start;
}

#swagger-ui {
padding-bottom: 112px;
}

</style>
</head>

Expand Down Expand Up @@ -117,6 +121,17 @@
<script src="/docs/swagger-ui-bundle.js"> </script>
<script src="/docs/swagger-ui-standalone-preset.js"> </script>
<script>
function collapseAll() {
blocks = document.getElementsByClassName("opblock-tag");
for (let i = 0; i < blocks.length; i++) {
blocks[i].click();
}
models = document.getElementsByClassName("models-control");
for (let i = 0; i < models.length; i++) {
models[i].click();
}
}

window.onload = function() {

const ui = SwaggerUIBundle({
Expand Down Expand Up @@ -146,6 +161,8 @@
}

window.ui = ui

setTimeout(collapseAll, 700);
}
</script>
</body>
Expand Down

0 comments on commit 4052973

Please sign in to comment.