102 lines
2.4 KiB
YAML
102 lines
2.4 KiB
YAML
basePath: /api/v1/
|
|
consumes:
|
|
- application/json
|
|
info:
|
|
contact:
|
|
email: alex@roese.dev
|
|
name: Alex
|
|
description: |-
|
|
Example Swagger spec.
|
|
|
|
Schemes: [http, https]
|
|
title: App-Idea Rest-API Documentation
|
|
version: 0.0.1
|
|
paths:
|
|
/user/activate/:id:
|
|
post:
|
|
operationId: activation
|
|
responses:
|
|
"200":
|
|
description: User was activated
|
|
"401":
|
|
description: Activation Id not correct or expired
|
|
summary: Activate user
|
|
tags:
|
|
- User
|
|
/user/login:
|
|
post:
|
|
operationId: userLogin
|
|
parameters:
|
|
- description: username or email
|
|
in: query
|
|
name: username or email
|
|
required: true
|
|
type: string
|
|
- description: password (base64) of the user
|
|
in: query
|
|
name: password
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: login success
|
|
"401":
|
|
description: login credentials not correct
|
|
summary: Login a user
|
|
tags:
|
|
- User
|
|
/users:
|
|
post:
|
|
operationId: usersNewUser
|
|
parameters:
|
|
- description: username of the user (length 3-30)
|
|
in: query
|
|
name: username
|
|
required: true
|
|
type: string
|
|
- description: email of the user (length 3-255)
|
|
in: query
|
|
name: email
|
|
required: true
|
|
type: string
|
|
- description: password (base64) of the user (length 6-250)
|
|
in: query
|
|
name: password
|
|
required: true
|
|
type: string
|
|
- description: hashtag of the client (length 2-6, UPPERCASE (Letters, Numbers))
|
|
in: query
|
|
name: hashtag
|
|
type: string
|
|
- description: avatar url of the client
|
|
in: query
|
|
name: avatar_url
|
|
type: string
|
|
- description: location of the client (length 1-20) (for example Frankfurt)
|
|
in: query
|
|
name: location
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
$ref: '#/definitions/User'
|
|
description: user created
|
|
"400":
|
|
description: format is not correct
|
|
"422":
|
|
description: username, email or/and hashtag already assigned
|
|
summary: Create new user
|
|
tags:
|
|
- User
|
|
produces:
|
|
- application/json
|
|
securityDefinitions:
|
|
api_key:
|
|
in: header
|
|
name: Authorization
|
|
type: apiKey
|
|
swagger: "2.0"
|