update swagger docs

This commit is contained in:
grumbulon 2023-02-04 21:05:39 -05:00 committed by Gitea
parent ae3e7a1ae6
commit f7f0a49512
4 changed files with 10 additions and 140 deletions

View file

@ -62,56 +62,6 @@ const docTemplate = `{
}
}
},
"/api/parse": {
"post": {
"security": [
{
"Bearer": []
}
],
"description": "parse your zonefile\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"DNS"
],
"summary": "parse your zonefile",
"parameters": [
{
"type": "string",
"description": "Zonefile name",
"name": "filename",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Bearer Token",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/internal.SwaggerGenericResponse-internal_Response"
}
},
"500": {
"description": "internalServerError is a 500 server error with a logged error call back",
"schema": {
"$ref": "#/definitions/internal.SwaggerGenericResponse-internal_Response"
}
}
}
}
},
"/api/upload": {
"post": {
"security": [
@ -119,7 +69,7 @@ const docTemplate = `{
"Bearer": []
}
],
"description": "upload takes files from the user and stores it locally to be parsed. Uploads are associated with a specific user.\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
"description": "Upload takes a multipart form file as user input. It must not exceede 1 mb and must be of text/plain content type.\nIf a file uploads successfully it will be saved locally and parsed.\nIf parsing is successful pomme will save the file to your ZoneDir defined in your config.\nUploads are associated with a specific user.\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
"consumes": [
"multipart/form-data"
],

View file

@ -53,56 +53,6 @@
}
}
},
"/api/parse": {
"post": {
"security": [
{
"Bearer": []
}
],
"description": "parse your zonefile\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"DNS"
],
"summary": "parse your zonefile",
"parameters": [
{
"type": "string",
"description": "Zonefile name",
"name": "filename",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Bearer Token",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/internal.SwaggerGenericResponse-internal_Response"
}
},
"500": {
"description": "internalServerError is a 500 server error with a logged error call back",
"schema": {
"$ref": "#/definitions/internal.SwaggerGenericResponse-internal_Response"
}
}
}
}
},
"/api/upload": {
"post": {
"security": [
@ -110,7 +60,7 @@
"Bearer": []
}
],
"description": "upload takes files from the user and stores it locally to be parsed. Uploads are associated with a specific user.\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
"description": "Upload takes a multipart form file as user input. It must not exceede 1 mb and must be of text/plain content type.\nIf a file uploads successfully it will be saved locally and parsed.\nIf parsing is successful pomme will save the file to your ZoneDir defined in your config.\nUploads are associated with a specific user.\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
"consumes": [
"multipart/form-data"
],

View file

@ -50,48 +50,15 @@ paths:
summary: authenticate as a regular user
tags:
- accounts
/api/parse:
post:
consumes:
- multipart/form-data
description: |-
parse your zonefile
Rate limited: 10 requests every 10 second
you must specify "Bearer" before entering your token
parameters:
- description: Zonefile name
in: query
name: filename
required: true
type: string
- description: Bearer Token
in: header
name: Authorization
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/internal.SwaggerGenericResponse-internal_Response'
"500":
description: internalServerError is a 500 server error with a logged error
call back
schema:
$ref: '#/definitions/internal.SwaggerGenericResponse-internal_Response'
security:
- Bearer: []
summary: parse your zonefile
tags:
- DNS
/api/upload:
post:
consumes:
- multipart/form-data
description: |-
upload takes files from the user and stores it locally to be parsed. Uploads are associated with a specific user.
Upload takes a multipart form file as user input. It must not exceede 1 mb and must be of text/plain content type.
If a file uploads successfully it will be saved locally and parsed.
If parsing is successful pomme will save the file to your ZoneDir defined in your config.
Uploads are associated with a specific user.
Rate limited: 10 requests every 10 second
you must specify "Bearer" before entering your token
parameters:

View file

@ -19,7 +19,10 @@ import (
// Upload godoc
//
// @Summary upload a zonefile
// @Description upload takes files from the user and stores it locally to be parsed. Uploads are associated with a specific user.
// @Description Upload takes a multipart form file as user input. It must not exceede 1 mb and must be of text/plain content type.
// @Description If a file uploads successfully it will be saved locally and parsed.
// @Description If parsing is successful pomme will save the file to your ZoneDir defined in your config.
// @Description Uploads are associated with a specific user.
//
// @Description Rate limited: 10 requests every 10 second
// @Description you must specify "Bearer" before entering your token