Skip to content

Commit

Permalink
📝 Remove swagger annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Oct 22, 2023
1 parent 2a02479 commit baab991
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 48 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 0 additions & 14 deletions internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]

// @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,
Expand Down
12 changes: 0 additions & 12 deletions internal/api/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
17 changes: 0 additions & 17 deletions internal/api/timeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit baab991

Please sign in to comment.