154 lines
6.6 KiB
Go
154 lines
6.6 KiB
Go
package controllers
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
_ "github.com/swaggo/swag/example/celler/httputil"
|
|
|
|
_ "git.dynamicdiscord.de/harakat/backend/models"
|
|
)
|
|
|
|
// Register godoc
|
|
// @Summary List all ressources
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param lang query string false "Language code of language that should be returned. Defaults to 'en'"
|
|
// @Param include query string false "Comma-separated related resources to include"
|
|
// @Success 200 {array} models.RessourceLocalizedResponse
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/ [get]
|
|
func (dc *DummyController) ListRessources(c *gin.Context) {}
|
|
|
|
// Register godoc
|
|
// @Summary Create a ressource
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param ressource body models.RessourceRequest true "ressource"
|
|
// @Success 200 {object} models.Ressource
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/ [post]
|
|
func (dc *DummyController) CreateRessource(c *gin.Context) {}
|
|
|
|
// Register godoc
|
|
// @Summary Retreive a ressource
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param lang query string false "Language code of language that should be returned. Defaults to 'en'"
|
|
// @Param include query string false "Comma-separated related resources to include"
|
|
// @Param id path int true "A unique integer value identifying this ressource."
|
|
// @Success 200 {object} models.RessourceLocalizedResponse
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/{id} [get]
|
|
func (dc *DummyController) RetreiveRessource(c *gin.Context) {}
|
|
|
|
// Register godoc
|
|
// @Summary Update an existing ressource
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param id path int true "A unique integer value identifying this ressource."
|
|
// @Param ressource body models.RessourceRequest true "updated ressource"
|
|
// @Success 200 {object} models.Ressource
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/{id} [put]
|
|
func (dc *DummyController) UpdateRessource(c *gin.Context) {}
|
|
|
|
// Register godoc
|
|
// @Summary Partially update an existing ressource
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param id path int true "A unique integer value identifying this ressource."
|
|
// @Param ressource body models.RessourceRequest true "partially updated ressource"
|
|
// @Success 200 {object} models.Ressource
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/{id} [patch]
|
|
func (dc *DummyController) PatchRessource(c *gin.Context) {}
|
|
|
|
// Register godoc
|
|
// @Summary Delete an existing ressource
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param id path int true "A unique integer value identifying this ressource."
|
|
// @Success 200 {object} EmptyResponse
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/{id} [delete]
|
|
func (dc *DummyController) DeleteRessource(c *gin.Context) {}
|
|
|
|
// ressource TRANSLATIONS
|
|
|
|
// Register godoc
|
|
// @Summary List all ressource translations
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param id path int true "A unique integer value identifying the ressource."
|
|
// @Success 200 {array} models.RessourceTranslation
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/{id}/translation [get]
|
|
func (dc *DummyController) ListRessourceTranslation(c *gin.Context) {}
|
|
|
|
// Register godoc
|
|
// @Summary Create a ressource translation
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param ressource body models.RessourceTranslationRequest true "ressource translation"
|
|
// @Success 200 {object} models.RessourceTranslation
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/{id}/translation [post]
|
|
func (dc *DummyController) CreateRessourceTranslation(c *gin.Context) {}
|
|
|
|
// Register godoc
|
|
// @Summary Retreive a ressource translation
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param id path int true "A unique integer value identifying the ressource."
|
|
// @Param id path int true "A unique integer value identifying the ressource translation."
|
|
// @Success 200 {object} models.RessourceTranslation
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/{id}/translation/{id} [get]
|
|
func (dc *DummyController) RetreiveRessourceTranslation(c *gin.Context) {}
|
|
|
|
// Register godoc
|
|
// @Summary Update an existing ressource translation
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param id path int true "A unique integer value identifying this ressource."
|
|
// @Param id path int true "A unique integer value identifying the ressource translation."
|
|
// @Param ressource body models.RessourceTranslationRequest true "updated ressource translation"
|
|
// @Success 200 {object} models.RessourceTranslation
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/{id}/translation/{id} [put]
|
|
func (dc *DummyController) UpdateRessourceTranslation(c *gin.Context) {}
|
|
|
|
// Register godoc
|
|
// @Summary Partially update an existing ressource translation
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param id path int true "A unique integer value identifying this ressource."
|
|
// @Param id path int true "A unique integer value identifying the ressource translation."
|
|
// @Param ressource body models.RessourceTranslationRequest true "partially updated ressource translation"
|
|
// @Success 200 {object} models.RessourceTranslation
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/{id}/translation/{id} [patch]
|
|
func (dc *DummyController) PatchRessourceTranslation(c *gin.Context) {}
|
|
|
|
// Register godoc
|
|
// @Summary Delete an existing ressource translation
|
|
// @Tags ressource
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param id path int true "A unique integer value identifying this ressource."
|
|
// @Param id path int true "A unique integer value identifying the ressource translation."
|
|
// @Success 200 {object} EmptyResponse
|
|
// @Failure 400 {object} httputil.HTTPError
|
|
// @Router /ressource/{id}/translation/{id} [delete]
|
|
func (dc *DummyController) DeleteRessourceTranslation(c *gin.Context) {}
|