Migrate to new swagger docs generation (#18)
This commit is contained in:
@ -1,6 +1,18 @@
|
||||
package models
|
||||
|
||||
// Create implements the creation method via the interface
|
||||
// @Summary Creates a new namespace
|
||||
// @Description Creates a new namespace.
|
||||
// @tags namespace
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security ApiKeyAuth
|
||||
// @Param namespace body models.Namespace true "The namespace you want to create."
|
||||
// @Success 200 {object} models.Namespace "The created namespace."
|
||||
// @Failure 400 {object} models.HTTPError "Invalid namespace object provided."
|
||||
// @Failure 403 {object} models.HTTPError "The user does not have access to the namespace"
|
||||
// @Failure 500 {object} models.Message "Internal error"
|
||||
// @Router /namespaces [put]
|
||||
func (n *Namespace) Create(doer *User) (err error) {
|
||||
// Check if we have at least a name
|
||||
if n.Name == "" {
|
||||
|
Reference in New Issue
Block a user