📝 Create missing models for API documentation

This commit is contained in:
2024-01-18 00:09:26 +01:00
parent e0190f4bb5
commit 607682884c
6 changed files with 68 additions and 49 deletions

View File

@ -66,27 +66,27 @@ func (nr *NotebookRule) Generate(params map[string]interface{}) (string, []byte,
return hostname, paramsJSON, nil
}
// @Summary Generate hostname for category "notebook"
// @Description Generates a hostname for a notebook based on dynamic rules.
// @Summary Generate hostname for category "notebook"
// @Description Generates a hostname for a notebook based on dynamic rules.
// @ID insert-notebook-hostname
// @Accept json
// @Produce json
// @Produce json
// @Tags Generating Hostnames
// @Param body body NotebookRuleInput true "Input data to generate hostname"
// @Success 200 {string} string "Hostname"
// @Success 200 {object} models.SimpleHostnameResponse "Hostname"
// @Router /api/notebook [post]
func (nr *NotebookRule) Insert(category string, hostname string, paramsJSON []byte) error {
return nr.baseInsert(category, hostname, paramsJSON)
}
// @Summary Update hostname for category "notebook"
// @Description Generates a new hostname for a notebook based on dynamic rules.
// @Summary Update hostname for category "notebook"
// @Description Generates a new hostname for a notebook based on dynamic rules.
// @ID update-notebook-hostname
// @Accept json
// @Produce json
// @Produce json
// @Tags Generating Hostnames
// @Param body body NotebookRuleInput true "Input data to generate hostname"
// @Success 200 {string} string "Hostname"
// @Success 200 {object} models.SimpleHostnameResponse "Hostname"
// @Router /api/notebook [put]
func (nr *NotebookRule) Update(category string, oldhostname string, hostname string, paramsJSON []byte) error {
return nr.baseUpdate(category, oldhostname, hostname, paramsJSON)