Skip to content

Commit

Permalink
Adding Post req JSON format
Browse files Browse the repository at this point in the history
  • Loading branch information
its-me-yps committed Jan 7, 2024
1 parent 443cde6 commit 805267f
Show file tree
Hide file tree
Showing 20 changed files with 846 additions and 29 deletions.
568 changes: 553 additions & 15 deletions docs/dist.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions openapi/components/responses/response.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'200':
description: Successful response
'400':
description: Bad request
'500':
description: Internal server error
17 changes: 17 additions & 0 deletions openapi/components/schemas/admin/user/new.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
type: object
properties:
newuser:
type: array
items:
type: object
properties:
roll:
type: string
name:
type: string
email:
type: string
gender:
type: string
passHash:
type: string
16 changes: 16 additions & 0 deletions openapi/components/schemas/users/login/first.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
type: object
properties:
roll:
type: string
authCode:
type: string
passHash:
type: string
pubKey:
type: string
privKey:
type: string
data:
type: string
enum:
- FIRST_LOGIN
29 changes: 29 additions & 0 deletions openapi/components/schemas/users/sendheart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
type: object
properties:
genderofsender:
type: string
enc1:
type: string
sha1:
type: string
enc2:
type: string
sha2:
type: string
enc3:
type: string
sha3:
type: string
enc4:
type: string
sha4:
type: string
returnhearts:
type: array
items:
type: object
properties:
enc:
type: string
sha:
type: string
41 changes: 41 additions & 0 deletions openapi/components/schemas/users/sendheartVirtual.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
type: object
properties:
hearts:
type: object
properties:
heart1:
type: object
properties:
enc:
type: string
sha:
type: string
id_encrypt:
type: string
heart2:
type: object
properties:
enc:
type: string
sha:
type: string
id_encrypt:
type: string
heart3:
type: object
properties:
enc:
type: string
sha:
type: string
id_encrypt:
type: string
heart4:
type: object
properties:
enc:
type: string
sha:
type: string
id_encrypt:
type: string
2 changes: 1 addition & 1 deletion openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ paths:
$ref: paths/users/verifyreturnhearts.yaml
/users/sentHeartDecoded:
$ref: paths/users/sentHeartDecoded.yaml
/users/special/returnclaimedheartlate:
/special/returnclaimedheartlate:
$ref: paths/users/special/returnclaimedheartlate.yaml
/users/publish:
$ref: paths/users/publish.yaml
Expand Down
20 changes: 19 additions & 1 deletion openapi/paths/admin/user/delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,22 @@ post:
- Admin
summary: Delete User
description: Receive the exact message you've sent
operationId: delete
operationId: delete
requestBody:
description:
required: true
content:
application/json:
schema:
type: object
properties:
roll:
type: string
name:
type: string
email:
type: string
gender:
type: string
responses:
$ref: ../../../components/responses/response.yaml
11 changes: 10 additions & 1 deletion openapi/paths/admin/user/new.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@ post:
- Admin
summary: Add New Users
description: Receive the exact message you've sent
operationId: newUsers
operationId: newUsers
requestBody:
description:
required: true
content:
application/json:
schema:
$ref: ../../../components/schemas/admin/user/new.yaml
responses:
$ref: ../../../components/responses/response.yaml
16 changes: 15 additions & 1 deletion openapi/paths/session/admin/login.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,18 @@ post:
- Session
summary: Admin Login
description: Receive the exact message you've sent
operationId: adminLogin
operationId: adminLogin
requestBody:
description:
required: true
content:
application/json:
schema:
type: object
properties:
id:
type: string
pass:
type: string
responses:
$ref: ../../../components/responses/response.yaml
16 changes: 15 additions & 1 deletion openapi/paths/session/login.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,18 @@ post:
- Session
summary: User Login
description: Receive the exact message you've sent
operationId: userLogin
operationId: userLogin
requestBody:
description:
required: true
content:
application/json:
schema:
type: object
properties:
_id:
type: string
passHash:
type: string
responses:
$ref: ../../components/responses/response.yaml
18 changes: 17 additions & 1 deletion openapi/paths/users/claimheart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,20 @@ post:
- Verify
summary: Claim from send_hearts Table
description: Receive the exact message you've sent
operationId: claimHeart
operationId: claimHeart
requestBody:
description:
required: true
content:
application/json:
schema:
type: object
properties:
enc:
type: string
sha:
type: string
genderOfSender:
type: string
responses:
$ref: ../../components/responses/response.yaml
11 changes: 10 additions & 1 deletion openapi/paths/users/login/first.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@ post:
- User
summary: Register User
description: Receive the exact message you've sent
operationId: register
operationId: register
requestBody:
description:
required: true
content:
application/json:
schema:
$ref: ../../../components/schemas/users/login/first.yaml
responses:
$ref: ../../../components/responses/response.yaml
12 changes: 11 additions & 1 deletion openapi/paths/users/mail:id.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@ post:
- User
summary: Mail Authentication Code
description: Receive the exact message you've sent
operationId: mail
operationId: mail
requestBody:
description:
required: true
content:
application/json:
schema:
type: object
properties: {}
responses:
$ref: ../../components/responses/response.yaml
12 changes: 11 additions & 1 deletion openapi/paths/users/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@ post:
- User
summary: User Permission to Publish his/her result
description: Receive the exact message you've sent
operationId: permisssion
operationId: permisssion
requestBody:
description:
required: true
content:
application/json:
schema:
type: object
properties: {}
responses:
$ref: ../../components/responses/response.yaml
11 changes: 10 additions & 1 deletion openapi/paths/users/sendheart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@ post:
- Send
summary: Send Hearts
description: Receive the exact message you've sent
operationId: sendHearts
operationId: sendHearts
requestBody:
description:
required: true
content:
application/json:
schema:
$ref: ../../components/schemas/users/sendheart.yaml
responses:
$ref: ../../components/responses/response.yaml
11 changes: 10 additions & 1 deletion openapi/paths/users/sendheartVirtual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@ post:
- Send
summary: Save User Selections
description: Receive the exact message you've sent
operationId: sendHeartsVirtual
operationId: sendHeartsVirtual
requestBody:
description:
required: true
content:
application/json:
schema:
$ref: ../../components/schemas/users/sendheartVirtual.yaml
responses:
$ref: ../../components/responses/response.yaml
21 changes: 20 additions & 1 deletion openapi/paths/users/sentHeartDecoded.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,23 @@ post:
- User
summary: Gender Wise Heart Count
description: Receive the exact message you've sent
operationId: heartCount
operationId: heartCount
requestBody:
description:
required: true
content:
application/json:
schema:
type: object
properties:
decodedHearts:
type: array
items:
type: object
properties:
enc:
type: string
genderOfSender:
type: string
responses:
$ref: ../../components/responses/response.yaml
21 changes: 20 additions & 1 deletion openapi/paths/users/special/returnclaimedheartlate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,23 @@ post:
- User
summary: Returning claim in return_hearts Table
description: Receive the exact message you've sent
operationId: late
operationId: late
requestBody:
description:
required: true
content:
application/json:
schema:
type: object
properties:
returnhearts:
type: array
items:
type: object
properties:
enc:
type: string
sha:
type: string
responses:
$ref: ../../../components/responses/response.yaml
Loading

0 comments on commit 805267f

Please sign in to comment.