From 02a6ad89413e039a840a2b76fdffb617abfffc91 Mon Sep 17 00:00:00 2001 From: its-me-yps Date: Sat, 6 Jan 2024 23:58:50 +0530 Subject: [PATCH] Paths --- docs/index.html | 1 - openapi/openapi.yaml | 128 ++++++++---------- openapi/paths/admin/publish.yaml | 6 + openapi/paths/admin/user/delete.yaml | 6 + openapi/paths/admin/user/deleteallusers.yaml | 6 + openapi/paths/admin/user/new.yaml | 6 + openapi/paths/session/admin/login.yaml | 7 + openapi/paths/session/login.yaml | 7 + openapi/paths/session/logout.yaml | 8 ++ openapi/paths/users/activeusers.yaml | 7 + openapi/paths/users/claimheart.yaml | 7 + openapi/paths/users/fetchPublicKeys.yaml | 7 + openapi/paths/users/fetchReturnHearts.yaml | 7 + openapi/paths/users/fetchall.yaml | 7 + openapi/paths/users/login/first.yaml | 6 + openapi/paths/users/mail:id.yaml | 6 + openapi/paths/users/mymatches.yaml | 6 + openapi/paths/users/publish.yaml | 6 + openapi/paths/users/sendheart.yaml | 7 + openapi/paths/users/sendheartVirtual.yaml | 7 + openapi/paths/users/sentHeartDecoded.yaml | 6 + .../users/special/returnclaimedheartlate.yaml | 6 + openapi/paths/users/verifyreturnhearts.yaml | 7 + 23 files changed, 195 insertions(+), 72 deletions(-) create mode 100644 openapi/paths/admin/publish.yaml create mode 100644 openapi/paths/admin/user/delete.yaml create mode 100644 openapi/paths/admin/user/deleteallusers.yaml create mode 100644 openapi/paths/admin/user/new.yaml create mode 100644 openapi/paths/session/admin/login.yaml create mode 100644 openapi/paths/session/login.yaml create mode 100644 openapi/paths/session/logout.yaml create mode 100644 openapi/paths/users/activeusers.yaml create mode 100644 openapi/paths/users/claimheart.yaml create mode 100644 openapi/paths/users/fetchPublicKeys.yaml create mode 100644 openapi/paths/users/fetchReturnHearts.yaml create mode 100644 openapi/paths/users/fetchall.yaml create mode 100644 openapi/paths/users/login/first.yaml create mode 100644 openapi/paths/users/mail:id.yaml create mode 100644 openapi/paths/users/mymatches.yaml create mode 100644 openapi/paths/users/publish.yaml create mode 100644 openapi/paths/users/sendheart.yaml create mode 100644 openapi/paths/users/sendheartVirtual.yaml create mode 100644 openapi/paths/users/sentHeartDecoded.yaml create mode 100644 openapi/paths/users/special/returnclaimedheartlate.yaml create mode 100644 openapi/paths/users/verifyreturnhearts.yaml diff --git a/docs/index.html b/docs/index.html index f5c13da..a700dfe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -17,7 +17,6 @@ padding: 0; } - {{{redocHead}}} diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 89d0dc6..f243db3 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -1,80 +1,66 @@ openapi: 3.1.0 info: + title: PuppyLove2.0_Backend + description: API Documentation for PuppyLove2.0_Backend [Github](https://github.com/pclubiitk/puppylove2.0_backend) version: 1.0.0 - title: Example.com - termsOfService: https://example.com/terms/ contact: - email: contact@example.com - url: http://example.com/contact - license: - name: Apache 2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://pclub.in/ x-logo: - url: https://redocly.github.io/openapi-template/logo.png - description: > - This is an **example** API to demonstrate features of the OpenAPI - specification. + url: https://pclub.in/images/pclub.png - # Introduction - - This API definition is intended to to be a good starting point for - describing your API in [OpenAPI/Swagger - format](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md). - - It also demonstrates features of the - [create-openapi-repo](https://github.com/Redocly/create-openapi-repo) tool - and the [Redoc](https://github.com/Redocly/Redoc) documentation engine. Beyond - the standard OpenAPI syntax, we use a few - [vendor extensions](https://github.com/Redocly/Redoc/blob/master/docs/redoc-vendor-extensions.md). - - # OpenAPI Specification - - The goal of The OpenAPI Specification is to define a standard, language-agnostic interface to REST APIs which - allows both humans and computers to discover and understand the capabilities - of the service without access to source - code, documentation, or through network traffic inspection. When properly - defined via OpenAPI, a consumer can - understand and interact with the remote service with a minimal amount of - implementation logic. Similar to what - interfaces have done for lower-level programming, OpenAPI removes the - guesswork in calling the service. tags: - - name: Echo - description: Example echo operations. + - name: Session + description: Endpoints for Session Login and Logout. - name: User - description: Operations about users. - - name: Tag - description: This is a tag description. -servers: - - url: https://{tenant}/api/v1 - variables: - tenant: - default: www - description: Your tenant id - - url: https://example.com/api/v1 + description: Endpoints for Users. + - name: Admin + description: Endpoints for Admin Use. + - name: Fetch + description: Endpoints for Fetching Tabular Data Fields for all users. + - name: Send + description: Endpoints for user to insert data in DB. + - name: Verify + description: Enpoints for user to verify claims about data in DB. paths: - /users/{username}: - $ref: paths/users_{username}.yaml - /echo: - $ref: paths/echo.yaml - /pathItem: - $ref: paths/pathItem.yaml - /pathItemWithExamples: - $ref: paths/pathItemWithExamples.yaml -components: - securitySchemes: - main_auth: - type: oauth2 - flows: - implicit: - authorizationUrl: http://example.com/api/oauth/dialog - scopes: - read:users: read users info - write:users: modify or remove users - api_key: - type: apiKey - in: header - name: api_key - basic_auth: - type: http - scheme: basic + /users/mail:id: + $ref: paths/users/mail:id.yaml + /users/login/first: + $ref: paths/users/login/first.yaml + /session/login: + $ref: paths/session/login.yaml + /session/logout: + $ref: paths/session/logout.yaml + /session/admin/login: + $ref: paths/session/admin/login.yaml + /admin/user/deleteallusers: + $ref: paths/admin/user/deleteallusers.yaml + /admin/user/new: + $ref: paths/admin/user/new.yaml + /admin/user/delete: + $ref: paths/admin/user/delete.yaml + /admin/publish: + $ref: paths/admin/publish.yaml + /users/activeusers: + $ref: paths/users/activeusers.yaml + /users/fetchPublicKeys: + $ref: paths/users/fetchPublicKeys.yaml + /users/fetchall: + $ref: paths/users/fetchall.yaml + /users/fetchReturnHearts: + $ref: paths/users/fetchReturnHearts.yaml + /users/sendheartVirtual: + $ref: paths/users/sendheartVirtual.yaml + /users/sendheart: + $ref: paths/users/sendheart.yaml + /users/claimheart: + $ref: paths/users/claimheart.yaml + /users/verifyreturnhearts: + $ref: paths/users/verifyreturnhearts.yaml + /users/sentHeartDecoded: + $ref: paths/users/sentHeartDecoded.yaml + /users/special/returnclaimedheartlate: + $ref: paths/users/special/returnclaimedheartlate.yaml + /users/publish: + $ref: paths/users/publish.yaml + /users/mymatches: + $ref: paths/users/mymatches.yaml \ No newline at end of file diff --git a/openapi/paths/admin/publish.yaml b/openapi/paths/admin/publish.yaml new file mode 100644 index 0000000..9241575 --- /dev/null +++ b/openapi/paths/admin/publish.yaml @@ -0,0 +1,6 @@ +get: + tags: + - Admin + summary: Publish Results + description: Receive the exact message you've sent + operationId: publish \ No newline at end of file diff --git a/openapi/paths/admin/user/delete.yaml b/openapi/paths/admin/user/delete.yaml new file mode 100644 index 0000000..40f9c7c --- /dev/null +++ b/openapi/paths/admin/user/delete.yaml @@ -0,0 +1,6 @@ +post: + tags: + - Admin + summary: Delete User + description: Receive the exact message you've sent + operationId: delete \ No newline at end of file diff --git a/openapi/paths/admin/user/deleteallusers.yaml b/openapi/paths/admin/user/deleteallusers.yaml new file mode 100644 index 0000000..dc30eba --- /dev/null +++ b/openapi/paths/admin/user/deleteallusers.yaml @@ -0,0 +1,6 @@ +get: + tags: + - Admin + summary: Delete All Users + description: Receive the exact message you've sent + operationId: deleteAll \ No newline at end of file diff --git a/openapi/paths/admin/user/new.yaml b/openapi/paths/admin/user/new.yaml new file mode 100644 index 0000000..48da6ec --- /dev/null +++ b/openapi/paths/admin/user/new.yaml @@ -0,0 +1,6 @@ +post: + tags: + - Admin + summary: Add New Users + description: Receive the exact message you've sent + operationId: newUsers \ No newline at end of file diff --git a/openapi/paths/session/admin/login.yaml b/openapi/paths/session/admin/login.yaml new file mode 100644 index 0000000..2fed48d --- /dev/null +++ b/openapi/paths/session/admin/login.yaml @@ -0,0 +1,7 @@ +post: + tags: + - Admin + - Session + summary: Admin Login + description: Receive the exact message you've sent + operationId: adminLogin \ No newline at end of file diff --git a/openapi/paths/session/login.yaml b/openapi/paths/session/login.yaml new file mode 100644 index 0000000..b8ef566 --- /dev/null +++ b/openapi/paths/session/login.yaml @@ -0,0 +1,7 @@ +post: + tags: + - User + - Session + summary: User Login + description: Receive the exact message you've sent + operationId: userLogin \ No newline at end of file diff --git a/openapi/paths/session/logout.yaml b/openapi/paths/session/logout.yaml new file mode 100644 index 0000000..aabd767 --- /dev/null +++ b/openapi/paths/session/logout.yaml @@ -0,0 +1,8 @@ +get: + tags: + - User + - Session + - Admin + summary: Logout + description: Receive the exact message you've sent + operationId: Logout \ No newline at end of file diff --git a/openapi/paths/users/activeusers.yaml b/openapi/paths/users/activeusers.yaml new file mode 100644 index 0000000..844e2b8 --- /dev/null +++ b/openapi/paths/users/activeusers.yaml @@ -0,0 +1,7 @@ +get: + tags: + - User + - Fetch + summary: Fetch All Active Users + description: Receive the exact message you've sent + operationId: activeUsers \ No newline at end of file diff --git a/openapi/paths/users/claimheart.yaml b/openapi/paths/users/claimheart.yaml new file mode 100644 index 0000000..4f3dd32 --- /dev/null +++ b/openapi/paths/users/claimheart.yaml @@ -0,0 +1,7 @@ +post: + tags: + - User + - Verify + summary: Claim from send_hearts Table + description: Receive the exact message you've sent + operationId: claimHeart \ No newline at end of file diff --git a/openapi/paths/users/fetchPublicKeys.yaml b/openapi/paths/users/fetchPublicKeys.yaml new file mode 100644 index 0000000..e549681 --- /dev/null +++ b/openapi/paths/users/fetchPublicKeys.yaml @@ -0,0 +1,7 @@ +get: + tags: + - User + - Fetch + summary: Fetch Public Keys + description: Receive the exact message you've sent + operationId: fetchKeys \ No newline at end of file diff --git a/openapi/paths/users/fetchReturnHearts.yaml b/openapi/paths/users/fetchReturnHearts.yaml new file mode 100644 index 0000000..0e5e3ec --- /dev/null +++ b/openapi/paths/users/fetchReturnHearts.yaml @@ -0,0 +1,7 @@ +get: + tags: + - User + - Fetch + summary: Fetch return_hearts Table + description: Receive the exact message you've sent + operationId: fetchReturnHearts \ No newline at end of file diff --git a/openapi/paths/users/fetchall.yaml b/openapi/paths/users/fetchall.yaml new file mode 100644 index 0000000..2fa577e --- /dev/null +++ b/openapi/paths/users/fetchall.yaml @@ -0,0 +1,7 @@ +get: + tags: + - User + - Fetch + summary: Fetch send_hearts Table + description: Receive the exact message you've sent + operationId: fetchAll \ No newline at end of file diff --git a/openapi/paths/users/login/first.yaml b/openapi/paths/users/login/first.yaml new file mode 100644 index 0000000..2dd1425 --- /dev/null +++ b/openapi/paths/users/login/first.yaml @@ -0,0 +1,6 @@ +post: + tags: + - User + summary: Register User + description: Receive the exact message you've sent + operationId: register \ No newline at end of file diff --git a/openapi/paths/users/mail:id.yaml b/openapi/paths/users/mail:id.yaml new file mode 100644 index 0000000..d4f5378 --- /dev/null +++ b/openapi/paths/users/mail:id.yaml @@ -0,0 +1,6 @@ +post: + tags: + - User + summary: Mail Authentication Code + description: Receive the exact message you've sent + operationId: mail \ No newline at end of file diff --git a/openapi/paths/users/mymatches.yaml b/openapi/paths/users/mymatches.yaml new file mode 100644 index 0000000..c7a49da --- /dev/null +++ b/openapi/paths/users/mymatches.yaml @@ -0,0 +1,6 @@ +get: + tags: + - User + summary: Matching Results + description: Receive the exact message you've sent + operationId: results \ No newline at end of file diff --git a/openapi/paths/users/publish.yaml b/openapi/paths/users/publish.yaml new file mode 100644 index 0000000..748c0c8 --- /dev/null +++ b/openapi/paths/users/publish.yaml @@ -0,0 +1,6 @@ +post: + tags: + - User + summary: User Permission to Publish his/her result + description: Receive the exact message you've sent + operationId: permisssion \ No newline at end of file diff --git a/openapi/paths/users/sendheart.yaml b/openapi/paths/users/sendheart.yaml new file mode 100644 index 0000000..e57af0e --- /dev/null +++ b/openapi/paths/users/sendheart.yaml @@ -0,0 +1,7 @@ +post: + tags: + - User + - Send + summary: Send Hearts + description: Receive the exact message you've sent + operationId: sendHearts \ No newline at end of file diff --git a/openapi/paths/users/sendheartVirtual.yaml b/openapi/paths/users/sendheartVirtual.yaml new file mode 100644 index 0000000..320c898 --- /dev/null +++ b/openapi/paths/users/sendheartVirtual.yaml @@ -0,0 +1,7 @@ +post: + tags: + - User + - Send + summary: Save User Selections + description: Receive the exact message you've sent + operationId: sendHeartsVirtual \ No newline at end of file diff --git a/openapi/paths/users/sentHeartDecoded.yaml b/openapi/paths/users/sentHeartDecoded.yaml new file mode 100644 index 0000000..b5d1481 --- /dev/null +++ b/openapi/paths/users/sentHeartDecoded.yaml @@ -0,0 +1,6 @@ +post: + tags: + - User + summary: Gender Wise Heart Count + description: Receive the exact message you've sent + operationId: heartCount \ No newline at end of file diff --git a/openapi/paths/users/special/returnclaimedheartlate.yaml b/openapi/paths/users/special/returnclaimedheartlate.yaml new file mode 100644 index 0000000..5bfe681 --- /dev/null +++ b/openapi/paths/users/special/returnclaimedheartlate.yaml @@ -0,0 +1,6 @@ +post: + tags: + - User + summary: Returning claim in return_hearts Table + description: Receive the exact message you've sent + operationId: late \ No newline at end of file diff --git a/openapi/paths/users/verifyreturnhearts.yaml b/openapi/paths/users/verifyreturnhearts.yaml new file mode 100644 index 0000000..11f7661 --- /dev/null +++ b/openapi/paths/users/verifyreturnhearts.yaml @@ -0,0 +1,7 @@ +post: + tags: + - User + - Verify + summary: Matching + description: Receive the exact message you've sent + operationId: matching \ No newline at end of file