mirror of
https://github.com/pushbits/server.git
synced 2025-04-29 18:26:49 +02:00
basic openapi docu
This commit is contained in:
parent
9c22816495
commit
db9eaa796a
2 changed files with 23 additions and 1 deletions
|
@ -26,6 +26,19 @@ func setupCleanup(db *database.Database, dp *dispatcher.Dispatcher) {
|
|||
}()
|
||||
}
|
||||
|
||||
// @title PushBits Server API Documentation
|
||||
// @version 1.0
|
||||
// @description Documentation for the PushBits server API.
|
||||
|
||||
// TODO add inprint and contact?
|
||||
// @contact.name API Support
|
||||
// @contact.url http://www.swagger.io/support
|
||||
|
||||
// @host your-domain.net
|
||||
// @BasePath /
|
||||
// @query.collection.format multi
|
||||
|
||||
// @securityDefinitions.basic BasicAuth
|
||||
func main() {
|
||||
log.Println("Starting PushBits.")
|
||||
|
||||
|
|
|
@ -109,7 +109,16 @@ func (h *ApplicationHandler) updateApplication(ctx *gin.Context, a *model.Applic
|
|||
return nil
|
||||
}
|
||||
|
||||
// CreateApplication creates an application.
|
||||
// CreateApplication godoc
|
||||
// @Summary Create Application
|
||||
// @Description Create a new application
|
||||
// @Accept mpfd
|
||||
// @Produce json
|
||||
// @Param name query string true "Name of the application"
|
||||
// @Param strict_compatability query boolean false "Use strict compatability mode"
|
||||
// @Success 200 {object} model.Application
|
||||
// @Failure 400 {string} ""
|
||||
// @Router /application [post]
|
||||
func (h *ApplicationHandler) CreateApplication(ctx *gin.Context) {
|
||||
var createApplication model.CreateApplication
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue