Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/52 api page and search #104

Merged
merged 22 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
351 changes: 336 additions & 15 deletions docs/open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ paths:
responses:
"200":
description: OK
content:
'*/*':
schema:
type: object
/users/signup:
post:
tags:
Expand Down Expand Up @@ -97,6 +101,23 @@ paths:
"200":
description: OK
/reservations:
get:
tags:
- reservation-controller
operationId: getReservations
parameters:
- name: pageable
in: query
required: true
schema:
$ref: '#/components/schemas/Pageable'
responses:
"200":
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/PageReservation'
post:
tags:
- reservation-controller
Expand All @@ -115,6 +136,28 @@ paths:
schema:
$ref: '#/components/schemas/ReservationResponse'
/events:
get:
tags:
- event-controller
operationId: getEvents
parameters:
- name: title
in: query
required: false
schema:
type: string
- name: pageable
in: query
required: true
schema:
$ref: '#/components/schemas/Pageable'
responses:
"200":
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/PageEvent'
post:
tags:
- event-controller
Expand All @@ -137,13 +180,19 @@ paths:
tags:
- bookmark-controller
operationId: getBookmarks
parameters:
- name: pageable
in: query
required: true
schema:
$ref: '#/components/schemas/Pageable'
responses:
"200":
description: OK
content:
'*/*':
schema:
type: object
$ref: '#/components/schemas/PageBookmark'
post:
tags:
- bookmark-controller
Expand Down Expand Up @@ -218,20 +267,6 @@ paths:
'*/*':
schema:
$ref: '#/components/schemas/EventResponse'
/events/:
get:
tags:
- event-controller
operationId: getEvents
responses:
"200":
description: OK
content:
'*/*':
schema:
type: array
items:
$ref: '#/components/schemas/EventResponse'
/bookmarks/{id}:
get:
tags:
Expand Down Expand Up @@ -416,3 +451,289 @@ components:
event_id:
type: integer
format: int32
Pageable:
type: object
properties:
page:
minimum: 0
type: integer
format: int32
size:
minimum: 1
type: integer
format: int32
sort:
type: array
items:
type: string
Bookmark:
required:
- createdAt
- event
- updatedAt
- user
type: object
properties:
id:
type: integer
format: int32
user:
$ref: '#/components/schemas/User'
event:
$ref: '#/components/schemas/Event'
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
Event:
required:
- bookmarks
- createdAt
- currentReservationCount
- date
- maxAttendees
- reservationEndTime
- reservationStartTime
- reservations
- title
- updatedAt
type: object
properties:
id:
type: integer
format: int32
title:
type: string
date:
type: string
format: date-time
reservationStartTime:
type: string
format: date-time
reservationEndTime:
type: string
format: date-time
maxAttendees:
type: integer
format: int32
currentReservationCount:
type: integer
format: int32
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
bookmarks:
type: array
items:
$ref: '#/components/schemas/Bookmark'
reservations:
type: array
items:
$ref: '#/components/schemas/Reservation'
GrantedAuthority:
type: object
properties:
authority:
type: string
PageReservation:
type: object
properties:
totalElements:
type: integer
format: int64
totalPages:
type: integer
format: int32
size:
type: integer
format: int32
content:
type: array
items:
$ref: '#/components/schemas/Reservation'
number:
type: integer
format: int32
sort:
$ref: '#/components/schemas/SortObject'
first:
type: boolean
last:
type: boolean
numberOfElements:
type: integer
format: int32
pageable:
$ref: '#/components/schemas/PageableObject'
empty:
type: boolean
PageableObject:
type: object
properties:
offset:
type: integer
format: int64
sort:
$ref: '#/components/schemas/SortObject'
pageNumber:
type: integer
format: int32
pageSize:
type: integer
format: int32
paged:
type: boolean
unpaged:
type: boolean
Reservation:
required:
- bookedAt
- event
- user
type: object
properties:
id:
type: integer
format: int32
user:
$ref: '#/components/schemas/User'
event:
$ref: '#/components/schemas/Event'
bookedAt:
type: string
format: date-time
SortObject:
type: object
properties:
empty:
type: boolean
sorted:
type: boolean
unsorted:
type: boolean
User:
required:
- authorities
- createdAt
- email
- isAccountNonExpired
- isAccountNonLocked
- isCredentialsNonExpired
- isEnabled
- name
- password
- pw
- role
- updatedAt
- username
type: object
properties:
name:
type: string
email:
type: string
password:
type: string
authority:
type: string
writeOnly: true
enum:
- USER
id:
type: integer
format: int32
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
pw:
type: string
role:
type: string
enum:
- USER
isEnabled:
type: boolean
authorities:
type: array
items:
$ref: '#/components/schemas/GrantedAuthority'
username:
type: string
isAccountNonExpired:
type: boolean
isAccountNonLocked:
type: boolean
isCredentialsNonExpired:
type: boolean
PageEvent:
type: object
properties:
totalElements:
type: integer
format: int64
totalPages:
type: integer
format: int32
size:
type: integer
format: int32
content:
type: array
items:
$ref: '#/components/schemas/Event'
number:
type: integer
format: int32
sort:
$ref: '#/components/schemas/SortObject'
first:
type: boolean
last:
type: boolean
numberOfElements:
type: integer
format: int32
pageable:
$ref: '#/components/schemas/PageableObject'
empty:
type: boolean
PageBookmark:
type: object
properties:
totalElements:
type: integer
format: int64
totalPages:
type: integer
format: int32
size:
type: integer
format: int32
content:
type: array
items:
$ref: '#/components/schemas/Bookmark'
number:
type: integer
format: int32
sort:
$ref: '#/components/schemas/SortObject'
first:
type: boolean
last:
type: boolean
numberOfElements:
type: integer
format: int32
pageable:
$ref: '#/components/schemas/PageableObject'
empty:
type: boolean
Loading