Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ LOCAL_BUILD_PLATFORM = linux/$(shell go env GOARCH)
# Testing
GO_TEST_FLAGS ?= -v -race -count=1 -tags $(BUILD_TAGS) -covermode=atomic -coverprofile=coverage.out
GOTESTFMT_FLAGS ?=
SHIORI_TEST_MYSQL_URL ?=shiori:shiori@tcp(127.0.0.1:3306)/shiori
SHIORI_TEST_MARIADB_URL ?= shiori:shiori@tcp(127.0.0.1:3307)/shiori
SHIORI_TEST_PG_URL ?= postgres://shiori:shiori@127.0.0.1:5432/shiori?sslmode=disable

# Development
GIN_MODE ?= debug
Expand All @@ -47,6 +50,10 @@ export BUILDX_PLATFORMS

export SOURCE_FILES

export SHIORI_TEST_MYSQL_URL
export SHIORI_TEST_MARIADB_URL
export SHIORI_TEST_PG_URL

# Help documentatin à la https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help:
Expand Down
236 changes: 224 additions & 12 deletions docs/swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,48 @@ const docTemplate = `{
}
}
},
"/api/v1/bookmarks/bulk/tags": {
"put": {
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "Bulk update tags for multiple bookmarks.",
"parameters": [
{
"description": "Bulk Update Bookmark Tags Payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api_v1.bulkUpdateBookmarkTagsPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/model.BookmarkDTO"
}
}
},
"400": {
"description": "Invalid request payload"
},
"403": {
"description": "Token not provided/invalid"
},
"404": {
"description": "No bookmarks found"
}
}
}
},
"/api/v1/bookmarks/cache": {
"put": {
"produces": [
Expand Down Expand Up @@ -381,7 +423,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/model.Tag"
"$ref": "#/definitions/model.TagDTO"
}
}
},
Expand All @@ -392,10 +434,191 @@ const docTemplate = `{
"description": "Internal server error"
}
}
},
"post": {
"description": "Create a new tag",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tags"
],
"summary": "Create tag",
"parameters": [
{
"description": "Tag data",
"name": "tag",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.TagDTO"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/model.TagDTO"
}
},
"400": {
"description": "Invalid request"
},
"403": {
"description": "Authentication required"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/api/v1/tags/{id}": {
"get": {
"description": "Get a tag by ID",
"produces": [
"application/json"
],
"tags": [
"Tags"
],
"summary": "Get tag",
"parameters": [
{
"type": "integer",
"description": "Tag ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/model.TagDTO"
}
},
"403": {
"description": "Authentication required"
},
"404": {
"description": "Tag not found"
},
"500": {
"description": "Internal server error"
}
}
},
"put": {
"description": "Update an existing tag",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tags"
],
"summary": "Update tag",
"parameters": [
{
"type": "integer",
"description": "Tag ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Tag data",
"name": "tag",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.TagDTO"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/model.TagDTO"
}
},
"400": {
"description": "Invalid request"
},
"403": {
"description": "Authentication required"
},
"404": {
"description": "Tag not found"
},
"500": {
"description": "Internal server error"
}
}
},
"delete": {
"description": "Delete a tag",
"tags": [
"Tags"
],
"summary": "Delete tag",
"parameters": [
{
"type": "integer",
"description": "Tag ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"403": {
"description": "Authentication required"
},
"404": {
"description": "Tag not found"
},
"500": {
"description": "Internal server error"
}
}
}
}
},
"definitions": {
"api_v1.bulkUpdateBookmarkTagsPayload": {
"type": "object",
"required": [
"bookmark_ids",
"tag_ids"
],
"properties": {
"bookmark_ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"tag_ids": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"api_v1.infoResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -602,17 +825,6 @@ const docTemplate = `{
}
}
},
"model.Tag": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"model.TagDTO": {
"type": "object",
"properties": {
Expand Down
Loading
Loading