Added Location and location ownership/rights to gamenight.
This commit is contained in:
@@ -38,6 +38,17 @@ paths:
|
||||
parameters: []
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
/users:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
$ref: '#/components/responses/UsersResponse'
|
||||
'400':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
'401':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
/user:
|
||||
post:
|
||||
summary: ''
|
||||
@@ -242,9 +253,72 @@ paths:
|
||||
$ref: '#/components/requestBodies/OwnedGamesRequest'
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
/location:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
$ref: '#/components/responses/LocationResponse'
|
||||
'401':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
'422':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/GetLocationRequest'
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
post:
|
||||
responses:
|
||||
'200':
|
||||
description: 'Ok'
|
||||
$ref: '#/components/responses/LocationIdResponse'
|
||||
'401':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
'422':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/AddLocationRequest'
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
/locations:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
$ref: '#/components/responses/LocationsResponse'
|
||||
'401':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
'422':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
/location_authorize:
|
||||
post:
|
||||
responses:
|
||||
'200':
|
||||
description: 'Ok'
|
||||
'401':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
'422':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/AuthorizeLocationRequest'
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
/authorized_location_user_ids:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
$ref: "#/components/responses/UserIdsResponse"
|
||||
'401':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
'422':
|
||||
$ref: '#/components/responses/FailureResponse'
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/AuthorizedLocationUserIdsRequest'
|
||||
security:
|
||||
- JWT-Auth: []
|
||||
|
||||
|
||||
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Gamenight:
|
||||
@@ -326,6 +400,14 @@ components:
|
||||
type: string
|
||||
required:
|
||||
- user_id
|
||||
LocationId:
|
||||
title: LocationId
|
||||
type: object
|
||||
properties:
|
||||
location_id:
|
||||
type: string
|
||||
required:
|
||||
- location_id
|
||||
AddGamenightRequestBody:
|
||||
title: AddGamenightRequestBody
|
||||
type: object
|
||||
@@ -401,7 +483,49 @@ components:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
|
||||
UserIdsResponse:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/UserId"
|
||||
AddLocationRequestBody:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
address:
|
||||
type: string
|
||||
note:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
Location:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
address:
|
||||
type: string
|
||||
note:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
AuthorizeLocationRequestBody:
|
||||
type: object
|
||||
properties:
|
||||
location_id:
|
||||
type: string
|
||||
user_id:
|
||||
type: string
|
||||
op:
|
||||
type: string
|
||||
enum: [grant, revoke]
|
||||
required:
|
||||
- location_id
|
||||
- user_id
|
||||
- op
|
||||
requestBodies:
|
||||
LoginRequest:
|
||||
content:
|
||||
@@ -473,6 +597,27 @@ components:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UserId'
|
||||
GetLocationRequest:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LocationId'
|
||||
AddLocationRequest:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/AddLocationRequestBody'
|
||||
AuthorizeLocationRequest:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/AuthorizeLocationRequestBody'
|
||||
AuthorizedLocationUserIdsRequest:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LocationId'
|
||||
|
||||
responses:
|
||||
TokenResponse:
|
||||
description: Example response
|
||||
@@ -500,6 +645,14 @@ components:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Gamenight'
|
||||
UsersResponse:
|
||||
description: List of all Users
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/User'
|
||||
GamenightResponse:
|
||||
description: A gamenight being hosted
|
||||
content:
|
||||
@@ -532,6 +685,34 @@ components:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GameIdsResponse'
|
||||
UserIdsResponse:
|
||||
description: A list of user ids.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UserIdsResponse'
|
||||
LocationResponse:
|
||||
description: A location
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Location'
|
||||
LocationIdResponse:
|
||||
description: A location Id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LocationId'
|
||||
|
||||
LocationsResponse:
|
||||
description: A list of all LocationsResponse
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Location'
|
||||
|
||||
securitySchemes:
|
||||
JWT-Auth:
|
||||
type: http
|
||||
|
||||
Reference in New Issue
Block a user