Skip to content

Commit

Permalink
Add admin endpoint in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaptoss committed Oct 7, 2024
1 parent 1919269 commit 5a50b2b
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 19 deletions.
25 changes: 25 additions & 0 deletions docs/spec/components/schemas/QRCode.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
allOf:
- $ref: '#/components/schemas/QRCodeKey'
- type: object
x-go-is-request: true
required:
- attributes
properties:
attributes:
type: object
properties:
reward:
type: integer
format: int
description: Reward for this qr-code
default: 10
example: 10
usage_count:
type: integer
format: int
description: Specify how many times qr-code can be scaned. Omit if qr-code must have infinity usage count
example: 1
nullifier:
type: string
description: For creating personal qr-codes
example: "0xabc...123"
24 changes: 5 additions & 19 deletions docs/spec/paths/integrations@geo-points-svc@v2@[email protected]
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
post:
tags:
- QRCodes
summary: Send QR code
description: Send a QR code and get a reward
operationId: sendQRCode
summary: Create QR code
description: Create custom qr code
operationId: createQRCode
security:
- BearerAuth: []
requestBody:
Expand All @@ -16,7 +16,7 @@ post:
- data
properties:
data:
$ref: '#/components/schemas/QRCodeKey'
$ref: '#/components/schemas/QRCode'
responses:
200:
description: Success
Expand All @@ -28,24 +28,10 @@ post:
- data
properties:
data:
$ref: '#/components/schemas/EventClaimingState'
$ref: '#/components/schemas/QRCode'
400:
$ref: '#/components/responses/invalidParameter'
401:
$ref: '#/components/responses/invalidAuth'
403:
description: May be user haven't verified passport
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/Errors'
404:
$ref: '#/components/responses/notFound'
409:
description: QR code already submited
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/Errors'
500:
$ref: '#/components/responses/internalError'
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
post:
tags:
- QRCodes
summary: Send QR code
description: Send a QR code and get a reward
operationId: submitQRCode
security:
- BearerAuth: []
requestBody:
required: true
content:
application/vnd.api+json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/QRCodeKey'
responses:
200:
description: Success
content:
application/vnd.api+json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/EventClaimingState'
400:
$ref: '#/components/responses/invalidParameter'
401:
$ref: '#/components/responses/invalidAuth'
403:
description: May be user haven't verified passport
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/Errors'
404:
$ref: '#/components/responses/notFound'
409:
description: QR code already submited
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/Errors'
500:
$ref: '#/components/responses/internalError'

0 comments on commit 5a50b2b

Please sign in to comment.