diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 2d801280..c5fb5df9 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -13,11 +13,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup go - uses: actions/setup-go@v4 - with: - go-version-file: "go.mod" - - name: Deploy Documentation uses: mhausenblas/mkdocs-deploy-gh-pages@master env: diff --git a/internal/api/api.go b/internal/api/api.go index 235d5354..9b6f6dbd 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -30,20 +30,6 @@ type handler struct { bridges bridge.Bridges } -// @title Ticker API -// @version 1.0 -// @description Service to distribute short messages in support of events, demonstrations, or other time-sensitive events. - -// @contact.name Systemli Admin Team -// @contact.url https://www.systemli.org/en/contact/ -// @contact.email admin@systemli.org - -// @license.name GPLv3 -// @license.url https://www.gnu.org/licenses/gpl-3.0.html - -// @host localhost:8080 -// @BasePath /v1 - func API(config config.Config, store storage.Storage, log *logrus.Logger) *gin.Engine { handler := handler{ config: config, diff --git a/internal/api/init.go b/internal/api/init.go index d52b13b5..529f868d 100644 --- a/internal/api/init.go +++ b/internal/api/init.go @@ -8,18 +8,6 @@ import ( "github.com/systemli/ticker/internal/api/response" ) -// GetInit returns the basic settings for the ticker. -// @Summary Retrieves the initial ticker configuration -// @Description The first request for retrieving information about the ticker. It is mandatory that the browser sends -// @Description the origin as a header. This can be overwritten with a query parameter. -// @Tags public -// @Accept json -// @Produce json -// @Param origin query string false "Origin from the ticker, e.g. demoticker.org" -// @Param origin header string false "Origin from the ticker, e.g. http://demoticker.org" -// @Success 200 {object} response.Response -// @Failure 500 {object} response.Response -// @Router /init [get] func (h *handler) GetInit(c *gin.Context) { settings := response.Settings{ RefreshInterval: h.storage.GetRefreshIntervalSettings().RefreshInterval, diff --git a/internal/api/timeline.go b/internal/api/timeline.go index adac911c..5c69abe3 100644 --- a/internal/api/timeline.go +++ b/internal/api/timeline.go @@ -10,23 +10,6 @@ import ( "github.com/systemli/ticker/internal/storage" ) -// GetTimeline returns the public timeline for a ticker. -// @Summary Fetch the messages for a ticker. -// @Description Endpoint to retrieve the messages from a ticker. The endpoint has a pagination to fetch newer or older -// @Description messages. It is mandatory that the browser sends the origin as a header. This can be overwritten with -// @Description a query parameter. -// @Tags public -// @Accept json -// @Produce json -// @Param origin query string false "Origin from the ticker, e.g. demoticker.org" -// @Param origin header string false "Origin from the ticker, e.g. http://demoticker.org" -// @Param limit query int false "Limit for fetched messages, default: 10" -// @Param before query int false "ID of the message we look for older entries" -// @Param after query int false "ID of the message we look for newer entries" -// @Success 200 {object} response.Response -// @Success 400 {object} response.Response -// @Failure 500 {object} response.Response -// @Router /timeline [get] func (h *handler) GetTimeline(c *gin.Context) { ticker, err := helper.Ticker(c) if err != nil {