mirror of
https://git.freecumextremist.com/grumbulon/pomme.git
synced 2024-11-19 07:24:13 +00:00
138 lines
3.2 KiB
YAML
138 lines
3.2 KiB
YAML
definitions:
|
|
api.httpError:
|
|
properties:
|
|
code:
|
|
example: 401
|
|
type: integer
|
|
message:
|
|
example: Status bad request
|
|
type: string
|
|
type: object
|
|
api.httpInternalServerError:
|
|
properties:
|
|
code:
|
|
example: 500
|
|
type: integer
|
|
message:
|
|
example: Internal Server Error
|
|
type: string
|
|
type: object
|
|
api.httpSuccess:
|
|
properties:
|
|
code:
|
|
example: 200
|
|
type: integer
|
|
message:
|
|
example: Success
|
|
type: string
|
|
type: object
|
|
info:
|
|
contact: {}
|
|
description: Pomme is a service that parses zonefiles
|
|
termsOfService: http://freecumextremist.com/
|
|
title: Pomme
|
|
version: 0.0.1
|
|
paths:
|
|
/api/login:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: login
|
|
parameters:
|
|
- description: Username
|
|
in: query
|
|
name: username
|
|
required: true
|
|
type: string
|
|
- description: Password
|
|
in: query
|
|
name: password
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/api.httpSuccess'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/api.httpError'
|
|
summary: auth a regular user
|
|
tags:
|
|
- accounts
|
|
/api/parse:
|
|
post:
|
|
consumes:
|
|
- multipart/form-data
|
|
description: parse your zonefile -- 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/api.httpSuccess'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/api.httpInternalServerError'
|
|
security:
|
|
- Bearer: []
|
|
summary: parse your zonefile
|
|
tags:
|
|
- DNS
|
|
/api/upload:
|
|
post:
|
|
consumes:
|
|
- multipart/form-data
|
|
description: upload a file -- you must specify "Bearer" before entering your
|
|
token
|
|
parameters:
|
|
- description: Zonefile to upload
|
|
in: formData
|
|
name: file
|
|
required: true
|
|
type: file
|
|
- description: Bearer Token
|
|
in: header
|
|
name: Authorization
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/api.httpSuccess'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/api.httpInternalServerError'
|
|
security:
|
|
- Bearer: []
|
|
summary: upload a zonefile
|
|
tags:
|
|
- DNS
|
|
securityDefinitions:
|
|
Bearer:
|
|
description: Type "Bearer" followed by a space and JWT token.
|
|
in: header
|
|
name: Authorization
|
|
type: apiKey
|
|
swagger: "2.0"
|