📝 Create missing models for API documentation
This commit is contained in:
@ -68,16 +68,16 @@ func CreateOrUpdateHostname(c *gin.Context, isUpdate bool) {
|
||||
c.JSON(http.StatusOK, gin.H{"hostname": hostname})
|
||||
}
|
||||
|
||||
// @Summary Delete a hostname from the database
|
||||
// @Description List all details for a given category
|
||||
// @ID delete-hostnames-by-category-and-name
|
||||
// @Produce json
|
||||
// @Param category path string true "Category of the hostname"
|
||||
// @Param hostname path string true "Hostname to delete"
|
||||
// @Success 200 {json} json "Hostname"
|
||||
// @Security Bearer
|
||||
// @Tags Manipulate existing Hostnames
|
||||
// @Router /{category}/{hostname} [delete]
|
||||
// @Summary Delete a hostname from the database
|
||||
// @Description List all details for a given category
|
||||
// @ID delete-hostnames-by-category-and-name
|
||||
// @Produce json
|
||||
// @Param category path string true "Category of the hostname"
|
||||
// @Param hostname path string true "Hostname to delete"
|
||||
// @Success 200 {object} models.SimpleHostnameResponse "Hostname"
|
||||
// @Security Bearer
|
||||
// @Tags Manipulate existing Hostnames
|
||||
// @Router /{category}/{hostname} [delete]
|
||||
func DeleteHostname(c *gin.Context) {
|
||||
category := c.Param("category")
|
||||
hostname := c.Param("hostname")
|
||||
@ -90,15 +90,15 @@ func DeleteHostname(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{"hostname": hostname})
|
||||
}
|
||||
|
||||
// @Summary Return a list of hosts and their details filtered by category
|
||||
// @Description List all details for a given category
|
||||
// @ID list-hostnames-by-category
|
||||
// @Produce json
|
||||
// @Param category path string true "Category of the hostname"
|
||||
// @Success 200 {json} json "Hostname"
|
||||
// @Security Bearer
|
||||
// @Tags Querying Hostnames
|
||||
// @Router /{category} [get]
|
||||
// @Summary Return a list of hosts and their details filtered by category
|
||||
// @Description List all details for a given category
|
||||
// @ID list-hostnames-by-category
|
||||
// @Produce json
|
||||
// @Param category path string true "Category of the hostname"
|
||||
// @Success 200 {array} models.Hostname "An array of responses"
|
||||
// @Security Bearer
|
||||
// @Tags Querying Hostnames
|
||||
// @Router /{category} [get]
|
||||
func ListHostnamesByCategory(c *gin.Context) {
|
||||
category := c.Param("category")
|
||||
|
||||
@ -114,16 +114,16 @@ func ListHostnamesByCategory(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, hostnames)
|
||||
}
|
||||
|
||||
// @Summary Return a single hostname by Category and Name
|
||||
// @Description Return details for a single hostname identified by its category
|
||||
// @ID get-hostname-by-category-and-name
|
||||
// @Produce json
|
||||
// @Param category path string true "Category of the hostname"
|
||||
// @Param hostname path string true "Category of the hostname"
|
||||
// @Security Bearer
|
||||
// @Success 200 {json} json "Hostname"
|
||||
// @Tags Querying Hostnames
|
||||
// @Router /{category}/{hostname} [get]
|
||||
// @Summary Return a single hostname by Category and Name
|
||||
// @Description Return details for a single hostname identified by its category
|
||||
// @ID get-hostname-by-category-and-name
|
||||
// @Produce json
|
||||
// @Param category path string true "Category of the hostname"
|
||||
// @Param hostname path string true "Category of the hostname"
|
||||
// @Success 200 {object} models.Hostname "A single response object"
|
||||
// @Security Bearer
|
||||
// @Tags Querying Hostnames
|
||||
// @Router /{category}/{hostname} [get]
|
||||
func GetHostnameByCategoryAndName(c *gin.Context) {
|
||||
category := c.Param("category")
|
||||
hostname := c.Param("hostname")
|
||||
|
Reference in New Issue
Block a user