Skip to content
Snippets Groups Projects
Commit 11617c48 authored by TimFB's avatar TimFB
Browse files

Merge branch 'master' of git.chaotikum.org:rasmus.thomsen/hackathon

parents ee6daf08 cdaba9e2
No related branches found
No related tags found
No related merge requests found
Pipeline #3464 passed
swagger: "2.0"
info:
version: "0.0.0"
title: "DVC 2021 Backend API"
contact:
email: "rasmus.thomsen@student.fh-kiel.de"
host: "localhost:8000"
schemes:
- "http"
paths:
/ribbons:
get:
summary: "Get all Ribbons."
produces:
- "application/json"
parameters:
- in: path
name: from
required: false
description: Minimum ribbon number to return. Must be lower than to.
- in: path
name: to
required: false
description: Maximum ribbon number to return. Must be higher than from.
responses:
"200":
description: "successful operation"
schema:
type: array
items:
$ref: "#/definitions/Ribbon"
"400":
description: "Invalid request"
/ribbons/{municipality}:
get:
summary: "Get a certain Ribbon."
produces:
- "application/json"
parameters:
- in: path
name: municipality
type: integer
required: true
description: Numeric ID of the municipality whose ribbon should be returned.
responses:
"200":
description: "successful operation"
schema:
type: array
items:
$ref: "#/definitions/Ribbon"
"400":
description: "Invalid request"
/ribbons/categories/{municipality}:
get:
summary: "Get what categories a certain ribbon belongs to."
produces:
- "application/json"
parameters:
- in: path
name: municipality
type: integer
required: true
description: Numeric ID of the municipality whose ribbon's categories should be returned.
responses:
"200":
description: "successful operation"
schema:
type: array
items:
$ref: "#/definitions/Category"
"400":
description: "Invalid request"
/ribbons/compare/{municipality}:
post:
summary: "Compare an uploaded image to the ribbon of a certain municipality."
consumes:
- "image/jpeg"
produces:
- "application/json"
parameters:
- in: path
name: municipality
type: integer
required: true
description: Numeric ID of the municipality whose ribbon should be compared to.
- in: formData
name: image
required: true
type: binary
description: The picture to compare to.
responses:
"200":
description: "successful operation"
schema:
type: array
items:
$ref: "#/definitions/Category"
"400":
description: "Invalid request"
definitions:
Ribbon:
type: "object"
properties:
acceptance:
type: "string"
format: "string"
author:
type: "string"
format: "string"
cancellation:
type: "string"
format: "string"
cancellationReason:
type: "string"
format: "string"
description:
type: "string"
format: "string"
figure:
type: "string"
format: "string"
historicalJustification:
type: "string"
format: "string"
img:
type: "string"
format: "string"
municipalityName:
type: "string"
format: "string"
municipality:
type: "array"
format: "array"
items:
type: "string"
format: "string"
Category:
type: "object"
properties:
name:
type: "string"
format: "string"
hitrate:
type: "number"
format: "number"
externalDocs:
description: "Find out more about Swagger"
url: "http://swagger.io"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment