more swagger docs + other changes (#125)

* more swagger docs + other changes

* go fmt
This commit is contained in:
Tobi Smethurst
2021-07-31 23:17:39 +02:00
committed by GitHub
parent 65bf285637
commit 6bd26ff4c4
15 changed files with 465 additions and 24 deletions

View File

@@ -10,6 +10,40 @@ import (
)
// DomainBlockGETHandler returns one existing domain block, identified by its id.
//
// swagger:operation GET /api/v1/admin/domain_blocks/{id} domainBlockGet
//
// View domain block with the given ID.
//
// ---
// tags:
// - admin
//
// produces:
// - application/json
//
// parameters:
// - name: id
// type: string
// description: The id of the domain block.
// in: path
// required: true
//
// security:
// - OAuth2 Bearer:
// - admin
//
// responses:
// '200':
// description: The requested domain block.
// schema:
// "$ref": "#/definitions/domainBlock"
// '403':
// description: forbidden
// '400':
// description: bad request
// '404':
// description: not found
func (m *Module) DomainBlockGETHandler(c *gin.Context) {
l := m.log.WithFields(logrus.Fields{
"func": "DomainBlockGETHandler",