2042 lines
67 KiB
Go
2042 lines
67 KiB
Go
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
|
package docs
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
const docTemplate = `{
|
|
"schemes": {{ marshal .Schemes }},
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "{{escape .Description}}",
|
|
"title": "{{.Title}}",
|
|
"termsOfService": "TODO",
|
|
"contact": {
|
|
"name": "TODO",
|
|
"url": "TODO",
|
|
"email": "TODO"
|
|
},
|
|
"license": {
|
|
"name": "TODO",
|
|
"url": "TODO"
|
|
},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/category/": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "List all categories",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Language code of language that should be returned. Defaults to 'en'",
|
|
"name": "lang",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Comma-separated related resources to include",
|
|
"name": "include",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.CategoryLocalizedResponse"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "Create a category",
|
|
"parameters": [
|
|
{
|
|
"description": "category",
|
|
"name": "category",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.CategoryRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.Category"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/category/{id}": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "Retreive a category",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Language code of language that should be returned. Defaults to 'en'",
|
|
"name": "lang",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Comma-separated related resources to include",
|
|
"name": "include",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this category.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.CategoryLocalizedResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "Update an existing category",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this category.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "updated category",
|
|
"name": "category",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.CategoryRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.Category"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "Delete an existing category",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this category.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.EmptyResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "Partially update an existing category",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this category.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "partially updated category",
|
|
"name": "category",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.CategoryRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.Category"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/category/{id}/translation": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "List all category translations",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the category.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.CategoryTranslation"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "Create a category translation",
|
|
"parameters": [
|
|
{
|
|
"description": "category translation",
|
|
"name": "category",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.CategoryTranslationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.CategoryTranslation"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/category/{id}/translation/{id}": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "Retreive a category translation",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the category.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the category translation.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.CategoryTranslation"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "Update an existing category translation",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this category.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the category translation.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "updated category translation",
|
|
"name": "category",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.CategoryTranslationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.CategoryTranslation"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "Delete an existing category translation",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this category.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the category translation.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.EmptyResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"category"
|
|
],
|
|
"summary": "Partially update an existing category translation",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this category.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the category translation.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "partially updated category translation",
|
|
"name": "category",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.CategoryTranslationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.CategoryTranslation"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/lang/": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"lang"
|
|
],
|
|
"summary": "List all languages",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.Language"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"lang"
|
|
],
|
|
"summary": "Create a language",
|
|
"parameters": [
|
|
{
|
|
"description": "language",
|
|
"name": "lang",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.LanguageRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.Language"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/lang/{id}": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"lang"
|
|
],
|
|
"summary": "Retreive a language",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this language.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.Language"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"lang"
|
|
],
|
|
"summary": "Update an existing language",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this language.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "updated language",
|
|
"name": "lang",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.LanguageRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.Language"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"lang"
|
|
],
|
|
"summary": "Delete an existing language",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this language.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.EmptyResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"lang"
|
|
],
|
|
"summary": "Partially update an existing language",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this language.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "partially updated language",
|
|
"name": "lang",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.LanguageRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.Language"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ressource/": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "List all ressources",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Language code of language that should be returned. Defaults to 'en'",
|
|
"name": "lang",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Comma-separated related resources to include",
|
|
"name": "include",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.RessourceLocalizedResponse"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "Create a ressource",
|
|
"parameters": [
|
|
{
|
|
"description": "ressource",
|
|
"name": "ressource",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RessourceRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.Ressource"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ressource/{id}": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "Retreive a ressource",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Language code of language that should be returned. Defaults to 'en'",
|
|
"name": "lang",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Comma-separated related resources to include",
|
|
"name": "include",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this ressource.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RessourceLocalizedResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "Update an existing ressource",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this ressource.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "updated ressource",
|
|
"name": "ressource",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RessourceRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.Ressource"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "Delete an existing ressource",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this ressource.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.EmptyResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "Partially update an existing ressource",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this ressource.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "partially updated ressource",
|
|
"name": "ressource",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RessourceRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.Ressource"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ressource/{id}/translation": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "List all ressource translations",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the ressource.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.RessourceTranslation"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "Create a ressource translation",
|
|
"parameters": [
|
|
{
|
|
"description": "ressource translation",
|
|
"name": "ressource",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RessourceTranslationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RessourceTranslation"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ressource/{id}/translation/{id}": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "Retreive a ressource translation",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the ressource.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the ressource translation.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RessourceTranslation"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "Update an existing ressource translation",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this ressource.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the ressource translation.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "updated ressource translation",
|
|
"name": "ressource",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RessourceTranslationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RessourceTranslation"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "Delete an existing ressource translation",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this ressource.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the ressource translation.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.EmptyResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ressource"
|
|
],
|
|
"summary": "Partially update an existing ressource translation",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying this ressource.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "A unique integer value identifying the ressource translation.",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "partially updated ressource translation",
|
|
"name": "ressource",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RessourceTranslationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RessourceTranslation"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/invite": {
|
|
"get": {
|
|
"description": "List active invite tokens",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "List active invite tokens",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.RegisterToken"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Create new invite token",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Create new invite token",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.RegisterToken"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/invite/{id}": {
|
|
"delete": {
|
|
"description": "Delete invite token",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Delete invite token",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "invite token id",
|
|
"name": "id",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.EmptyResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/login": {
|
|
"post": {
|
|
"description": "Login user",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Login user",
|
|
"parameters": [
|
|
{
|
|
"description": "user data",
|
|
"name": "user",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.LoginRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.EmptyResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/register/{token}": {
|
|
"post": {
|
|
"description": "register user with invite token",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Register user with invite token",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "invite token",
|
|
"name": "token",
|
|
"in": "path"
|
|
},
|
|
{
|
|
"description": "user data",
|
|
"name": "user",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.RegisterRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.EmptyResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/status": {
|
|
"get": {
|
|
"description": "Get user status of current session",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "User Status",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.EmptyResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/httputil.HTTPError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"controllers.EmptyResponse": {
|
|
"type": "object"
|
|
},
|
|
"controllers.LoginRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"controllers.RegisterRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"name",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"gorm.DeletedAt": {
|
|
"type": "object",
|
|
"properties": {
|
|
"time": {
|
|
"type": "string"
|
|
},
|
|
"valid": {
|
|
"description": "Valid is true if Time is not NULL",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"httputil.HTTPError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"example": 400
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "status bad request"
|
|
}
|
|
}
|
|
},
|
|
"models.Category": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"deletedAt": {
|
|
"$ref": "#/definitions/gorm.DeletedAt"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"translations": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.CategoryTranslation"
|
|
}
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"models.CategoryLocalizedResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"language",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"translation": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.CategoryTranslation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"models.CategoryRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"translations"
|
|
],
|
|
"properties": {
|
|
"translations": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.CategoryTranslationRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"models.CategoryTranslation": {
|
|
"type": "object",
|
|
"properties": {
|
|
"categoryID": {
|
|
"type": "integer"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"deletedAt": {
|
|
"$ref": "#/definitions/gorm.DeletedAt"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"languageID": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"models.CategoryTranslationRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"languageId",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"languageId": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"models.Language": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"deletedAt": {
|
|
"$ref": "#/definitions/gorm.DeletedAt"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"models.LanguageRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"models.RegisterToken": {
|
|
"type": "object",
|
|
"required": [
|
|
"token"
|
|
],
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"deletedAt": {
|
|
"$ref": "#/definitions/gorm.DeletedAt"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"models.Ressource": {
|
|
"type": "object",
|
|
"properties": {
|
|
"category": {
|
|
"$ref": "#/definitions/models.Category"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"deletedAt": {
|
|
"$ref": "#/definitions/gorm.DeletedAt"
|
|
},
|
|
"feedback": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.RessourceFeedback"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"image": {
|
|
"type": "string"
|
|
},
|
|
"region": {
|
|
"type": "string"
|
|
},
|
|
"spokenLanguages": {
|
|
"type": "string"
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
},
|
|
"translations": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.RessourceTranslation"
|
|
}
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"models.RessourceFeedback": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"deletedAt": {
|
|
"$ref": "#/definitions/gorm.DeletedAt"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"ressourceID": {
|
|
"type": "integer"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"models.RessourceLocalizedResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"categoryName",
|
|
"id",
|
|
"language",
|
|
"name",
|
|
"region",
|
|
"text"
|
|
],
|
|
"properties": {
|
|
"category": {
|
|
"$ref": "#/definitions/models.Category"
|
|
},
|
|
"categoryName": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"image": {
|
|
"type": "string"
|
|
},
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"region": {
|
|
"type": "string"
|
|
},
|
|
"spokenLanguages": {
|
|
"type": "string"
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"translations": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.RessourceTranslation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"models.RessourceRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"categoryId",
|
|
"region",
|
|
"translations"
|
|
],
|
|
"properties": {
|
|
"categoryId": {
|
|
"type": "integer"
|
|
},
|
|
"image": {
|
|
"type": "string"
|
|
},
|
|
"region": {
|
|
"type": "string"
|
|
},
|
|
"spokenLanguages": {
|
|
"type": "string"
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
},
|
|
"translations": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.RessourceTranslationRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"models.RessourceTranslation": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"deletedAt": {
|
|
"$ref": "#/definitions/gorm.DeletedAt"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"languageID": {
|
|
"type": "integer"
|
|
},
|
|
"metadata": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"ressourceID": {
|
|
"type": "integer"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"models.RessourceTranslationRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"languageId",
|
|
"name",
|
|
"ressourceId",
|
|
"text"
|
|
],
|
|
"properties": {
|
|
"languageId": {
|
|
"type": "integer"
|
|
},
|
|
"metadata": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"ressourceId": {
|
|
"type": "integer"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"BasicAuth": {
|
|
"type": "basic"
|
|
}
|
|
},
|
|
"externalDocs": {
|
|
"description": "OpenAPI",
|
|
"url": "https://swagger.io/resources/open-api/"
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "0.1",
|
|
Host: "localhost:8080",
|
|
BasePath: "/api/v0",
|
|
Schemes: []string{},
|
|
Title: "Harakat Rest-API",
|
|
Description: "This is harakat backend server.",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|