197 lines
4.2 KiB
YAML
197 lines
4.2 KiB
YAML
basePath: /
|
|
definitions:
|
|
api.getAliasesOutputAlias:
|
|
properties:
|
|
id:
|
|
type: integer
|
|
name:
|
|
type: string
|
|
type: object
|
|
api.getImagesOutputImage:
|
|
properties:
|
|
aliases:
|
|
items:
|
|
type: string
|
|
type: array
|
|
id:
|
|
type: integer
|
|
uploadedAt:
|
|
type: integer
|
|
uploadedUserId:
|
|
type: string
|
|
type: object
|
|
auth.postGenLoginUrlInput:
|
|
properties:
|
|
userId:
|
|
type: string
|
|
type: object
|
|
auth.postGenLoginUrlOutput:
|
|
properties:
|
|
loginUrl:
|
|
type: string
|
|
type: object
|
|
auth.postLoginInput:
|
|
properties:
|
|
token:
|
|
type: string
|
|
type: object
|
|
info:
|
|
contact: {}
|
|
license:
|
|
name: 0BSD
|
|
termsOfService: http://swagger.io/terms
|
|
title: Golang 2025 Final Project
|
|
version: 0.0.1
|
|
paths:
|
|
/api/alias-update:
|
|
get:
|
|
description: get update notification using websocket
|
|
responses: {}
|
|
summary: Get notification when alias update
|
|
/api/alias/{id}:
|
|
delete:
|
|
description: delete alias along with the links
|
|
parameters:
|
|
- description: Alias Id
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
"401":
|
|
description: Unauthorized
|
|
"404":
|
|
description: Not Found
|
|
summary: Delete alias
|
|
/api/aliases:
|
|
get:
|
|
description: get alias ids and names
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/api.getAliasesOutputAlias'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
"401":
|
|
description: Unauthorized
|
|
summary: Get aliases
|
|
/api/image:
|
|
post:
|
|
consumes:
|
|
- image/png
|
|
- image/jpeg
|
|
- image/gif
|
|
parameters:
|
|
- description: userinfo from /auth/gen-login-url
|
|
in: header
|
|
name: userinfo
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
"401":
|
|
description: Unauthorized
|
|
/api/image/{id}:
|
|
delete:
|
|
description: delete image along with the links
|
|
parameters:
|
|
- description: Image Id
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
"401":
|
|
description: Unauthorized
|
|
"404":
|
|
description: Not Found
|
|
summary: Delete image
|
|
/api/image/{id}/aliases:
|
|
put:
|
|
parameters:
|
|
- description: Image Id
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
- description: Payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
items:
|
|
type: string
|
|
type: array
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
"401":
|
|
description: Unauthorized
|
|
"404":
|
|
description: Not Found
|
|
/api/images:
|
|
get:
|
|
parameters:
|
|
- collectionFormat: csv
|
|
description: Image Ids
|
|
in: query
|
|
items:
|
|
type: integer
|
|
name: images
|
|
type: array
|
|
- collectionFormat: csv
|
|
description: Alias Ids
|
|
in: query
|
|
items:
|
|
type: integer
|
|
name: aliases
|
|
type: array
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/api.getImagesOutputImage'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
"401":
|
|
description: Unauthorized
|
|
/auth/gen-login-url:
|
|
post:
|
|
parameters:
|
|
- description: Payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/auth.postGenLoginUrlInput'
|
|
responses:
|
|
"200":
|
|
description: Payload
|
|
schema:
|
|
$ref: '#/definitions/auth.postGenLoginUrlOutput'
|
|
"400":
|
|
description: Bad Request
|
|
/auth/login:
|
|
post:
|
|
parameters:
|
|
- description: payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/auth.postLoginInput'
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
swagger: "2.0"
|