Skip to content

Commit

Permalink
improve doc
Browse files Browse the repository at this point in the history
  • Loading branch information
neolynx committed Oct 5, 2024
1 parent ce61423 commit 236e0d6
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 10 deletions.
6 changes: 3 additions & 3 deletions api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ func Router(c *ctx.AptlyContext) http.Handler {
router.Use(gin.Recovery(), gin.ErrorLogger())

if c.Config().EnableSwaggerEndpoint {
router.GET("docs.html", func(c *gin.Context) {
c.Data(http.StatusOK, "text/html; charset=utf-8", docs.DocsHTML)
})
router.GET("docs.html", func(c *gin.Context) {
c.Data(http.StatusOK, "text/html; charset=utf-8", docs.DocsHTML)
})
router.Use(redirectSwagger)
url := ginSwagger.URL("/docs/doc.json")
router.GET("/docs/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, url))
Expand Down
1 change: 1 addition & 0 deletions docs/Database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Aptly Database Operations
13 changes: 9 additions & 4 deletions docs/Status.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<center>
## Aptly Status Information
</center>
# Aptly Status Information
<div>

asd wer
## Something

Very interesting ... asd wer



</div>
25 changes: 22 additions & 3 deletions docs/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@
margin:0;
background: #fafafa;
}

.opblock-summary-description {
flex: 0 0 auto !important;
margin-left: auto !important;
margin-right: 2em;
font-weight: bold;
font-size: 15pt !important;
}

.opblock-tag-section > .opblock-tag > a {
color: grey !important;
align-self: flex-end;
font-size: 14pt;
width: 7em;
}

.swagger-ui .opblock-tag-section:not(.is-open) .opblock-tag .markdown > div {
display: none;
}
</style>
</head>

Expand Down Expand Up @@ -78,15 +97,15 @@
persistAuthorization: false ,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
SwaggerUIStandalonePreset.slice(1) // remote topbar
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
layout: "StandaloneLayout",
docExpansion: "list",
deepLinking: true ,
defaultModelsExpandDepth: 1
defaultModelsExpandDepth: 5
})

const defaultClientId = "";
Expand Down
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ var Version string
// @contact.name Aptly
// @contact.url http://github.com/aptly-dev/aptly

// @Tag.name Database
// @Tag.description.markdown

// @Tag.name Status
// @Tag.description.markdown

Expand Down

0 comments on commit 236e0d6

Please sign in to comment.