-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
81 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
docs/spec/paths/integrations@geo-points-svc@v2@public@qrcodes@{qr_code}.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |