Skip to content

Commit

Permalink
Added submodule API
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfesteban committed Jul 22, 2024
1 parent 7645701 commit 11d8c0a
Show file tree
Hide file tree
Showing 20 changed files with 1,811 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "api/RheneAPI"]
path = api/RheneAPI
url = https://github.com/username/RheneAPI.git
[submodule "openapi"]
path = openapi
url = git@github.com:davidfesteban/RheneAPI.git
1 change: 1 addition & 0 deletions openapi
Submodule openapi added at b824ea
39 changes: 39 additions & 0 deletions src/api/opeanapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
openapi: 3.0.2
info:
title: Sample API
version: 1.0.0
servers:
- url: http://localhost:8080
paths: {}
components:
schemas:
Identity:
$ref: './schemas/Identity.yaml'
Consumer:
$ref: './schemas/Consumer.yaml'
ConsumerPrivacySettings:
$ref: './schemas/ConsumerPrivacySettings.yaml'
ConsumerBillingSettings:
$ref: './schemas/ConsumerBillingSettings.yaml'
AppointmentId:
$ref: './schemas/AppointmentId.yaml'
ReviewId:
$ref: './schemas/ReviewId.yaml'
Review:
$ref: './schemas/Review.yaml'
Worker:
$ref: './schemas/Worker.yaml'
WorkerBillingSettings:
$ref: './schemas/WorkerBillingSettings.yaml'
Appointment:
$ref: './schemas/Appointment.yaml'
Approval:
$ref: './schemas/Approval.yaml'
Unavailability:
$ref: './schemas/Unavailability.yaml'
Services:
$ref: './schemas/Services.yaml'
Service:
$ref: './schemas/Service.yaml'
Billing:
$ref: './schemas/Billing.yaml'
23 changes: 23 additions & 0 deletions src/api/schemas/Appointment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
type: object
properties:
_id:
type: string
format: uuid
_consumerId:
type: string
format: uuid
_workerId:
type: string
format: uuid
approval:
$ref: './Approval.yaml'
from:
type: string
format: date-time
totalTime:
type: number
format: double
serviceCopy:
$ref: './Service.yaml'
billingCopy:
$ref: './Billing.yaml'
9 changes: 9 additions & 0 deletions src/api/schemas/AppointmentId.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type: object
properties:
_appointmentId:
type: string
format: uuid
date:
type: string
format: date
description: Comparable based on date. Recent goes first.
6 changes: 6 additions & 0 deletions src/api/schemas/Approval.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: object
properties:
consumerApproval:
type: boolean
workerApproval:
type: boolean
7 changes: 7 additions & 0 deletions src/api/schemas/Billing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: object
properties:
billingAmount:
type: number
format: double
currency:
type: string
27 changes: 27 additions & 0 deletions src/api/schemas/Consumer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
type: object
properties:
_id:
type: string
format: uuid
_IdentityId:
type: string
format: uuid
_appointmentIds:
type: array
items:
$ref: './AppointmentId.yaml'
_reviewIds:
type: array
items:
$ref: './ReviewId.yaml'
name:
type: string
profileImg:
type: string
format: base64
phone:
type: string
privacySettings:
$ref: './ConsumerPrivacySettings.yaml'
billingSettings:
$ref: './ConsumerBillingSettings.yaml'
6 changes: 6 additions & 0 deletions src/api/schemas/ConsumerBillingSettings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: object
properties:
hasPaidAdvertisement:
type: boolean
TBD:
type: string
4 changes: 4 additions & 0 deletions src/api/schemas/ConsumerPrivacySettings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type: object
properties:
allowEveryoneSeeMyProfile:
type: boolean
10 changes: 10 additions & 0 deletions src/api/schemas/Identity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type: object
properties:
_id:
type: string
format: uuid
email:
type: string
password:
type: string
description: Password hash
19 changes: 19 additions & 0 deletions src/api/schemas/Review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
type: object
properties:
_id:
type: string
format: uuid
_workerId:
type: string
format: uuid
_consumer:
type: string
format: uuid
rate:
type: integer
minimum: 1
maximum: 10
message:
type: string
appointment:
$ref: './AppointmentId.yaml'
9 changes: 9 additions & 0 deletions src/api/schemas/ReviewId.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type: object
properties:
_reviewId:
type: string
format: uuid
date:
type: string
format: date
description: Comparable based on date. Recent goes first.
6 changes: 6 additions & 0 deletions src/api/schemas/Service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: object
properties:
serviceName:
type: string
description:
type: string
6 changes: 6 additions & 0 deletions src/api/schemas/Services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: object
properties:
serviceList:
type: array
items:
type: string
5 changes: 5 additions & 0 deletions src/api/schemas/Unavailability.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: object
properties:
date:
type: string
format: date
24 changes: 24 additions & 0 deletions src/api/schemas/Worker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
type: object
properties:
_id:
type: string
format: uuid
_IdentityId:
type: string
format: uuid
_appointmentIds:
type: array
items:
$ref: './AppointmentId.yaml'
_reviewIds:
type: array
items:
$ref: './ReviewId.yaml'
notAvilableDates:
type: array
items:
$ref: './Unavailability.yaml'
services:
$ref: './Services.yaml'
billingSettings:
$ref: './WorkerBillingSettings.yaml'
13 changes: 13 additions & 0 deletions src/api/schemas/WorkerBillingSettings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type: object
properties:
allowMultibooking:
type: integer
minimum: -1
maximum: 999
enableGuestBooking:
type: boolean
enableVerifiedBooking:
type: boolean
enableInsuranceBooking:
type: boolean
default: true
Loading

0 comments on commit 11d8c0a

Please sign in to comment.