From ebd0461567a726359630f5fce0a86a415c6282b5 Mon Sep 17 00:00:00 2001 From: napalmpapalam <47495186+napalmpapalam@users.noreply.github.com> Date: Sat, 16 Dec 2023 20:32:38 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20abc96?= =?UTF-8?q?00fb7dfdcbefabc83c8a6ce57d0a43e8d80=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- favicon.png | Bin 0 -> 716 bytes index.hbs | 24 ++++ index.html | 32 +++++ openapi.json | 348 +++++++++++++++++++++++++++++++++++++++++++++++++++ openapi.yaml | 234 ++++++++++++++++++++++++++++++++++ 5 files changed, 638 insertions(+) create mode 100644 favicon.png create mode 100644 index.hbs create mode 100644 index.html create mode 100644 openapi.json create mode 100644 openapi.yaml diff --git a/favicon.png b/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..b5c1a2d8b44a7e0021d8ee7305a3570f7462c942 GIT binary patch literal 716 zcmV;-0yF)IP)%VB|+?Zc6U79Fd(~o z{D|pM53aYv*Xu*+;t;R ztxTS_#uaVTO10!N0#Td+sPZOI3}g;K7gmNv;&8mC}ovhoU7~Hk?V{(mxXdpITSDfy{OtD$)?{1ik>OE-luH zcgy2=!JC=`aq0k|)I?_Lm`LnXfmA*L+d4?EMnduYmsd90h0q**|exB8$z}aF>sLu4C9dhsv3+ zV=4O<7(1iQUpzOT!sZ7Nq(kL(ESf(QtyZ>>*}!!gN@a#PonP%;PEvbvSM)*{BZ#O0<&1RUAl#1Bq#zwj4wU+CUb5VXL6)`Ef<1vQcahkbbW(a@M1*!5nupxRRQ8B9DfM_0000 + + + + + Rarime Dashboard Link Service Documentation + + + + {{{redocHead}}} + + + + + +{{{redocHTML}}} + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..5625d19 --- /dev/null +++ b/index.html @@ -0,0 +1,32 @@ + + + + Rarime Dashboard Link Service | ReDoc + + + + + + + + + +
+ + + + diff --git a/openapi.json b/openapi.json new file mode 100644 index 0000000..8e2e2e3 --- /dev/null +++ b/openapi.json @@ -0,0 +1,348 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.0.0", + "title": "Dashboard Rarime Link Service", + "description": "" + }, + "servers": [ + { + "url": "https://api.demo.tokend.io", + "description": "dashboard-rarime-link-svc" + } + ], + "paths": { + "/v1/proofs": { + "post": { + "tags": [ + "Proofs" + ], + "summary": "Create the proof", + "description": "Allows to create a proof in the service database. After saving the proof, it will be accessible by its ID.\n", + "operationId": "createProof", + "security": [ + { + "Bearer": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "$ref": "#/components/schemas/ProofCreate" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/Proof" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/invalidParameter" + }, + "401": { + "$ref": "#/components/responses/invalidAuth" + }, + "500": { + "$ref": "#/components/responses/internalError" + } + } + } + }, + "/v1/proofs/{id}": { + "get": { + "summary": "Get Proof by ID", + "description": "Returns information about the particular proof.\n", + "operationId": "proofByID", + "tags": [ + "Proofs" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The ID of the proof", + "schema": { + "type": "string", + "example": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.api+json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/Proof" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/invalidParameter" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "500": { + "$ref": "#/components/responses/internalError" + } + } + } + } + }, + "components": { + "schemas": { + "Enum": { + "type": "object", + "required": [ + "value", + "name" + ], + "properties": { + "value": { + "type": "integer", + "example": 1 + }, + "name": { + "type": "string", + "example": "General" + } + } + }, + "Errors": { + "description": "Standard JSON:API error", + "type": "object", + "required": [ + "errors" + ], + "properties": { + "errors": { + "type": "array", + "description": "Non empty array of errors occurred during request processing", + "items": { + "type": "object", + "required": [ + "title", + "status" + ], + "properties": { + "title": { + "type": "string", + "description": "Title is a short, human-readable summary of the problem", + "example": "Bad Request" + }, + "detail": { + "type": "string", + "description": "Detail is a human-readable explanation specific to this occurrence of the problem", + "example": "Request body was expected" + }, + "status": { + "type": "integer", + "description": "Status is the HTTP status code applicable to this problem", + "example": 400, + "enum": [ + 400, + 401, + 403, + 404, + 409, + 500 + ] + } + } + } + } + } + }, + "Proof": { + "allOf": [ + { + "$ref": "#/components/schemas/ProofKey" + }, + { + "type": "object", + "required": [ + "attributes" + ], + "properties": { + "attributes": { + "type": "object", + "required": [ + "creator", + "created_at", + "proof" + ], + "properties": { + "creator": { + "type": "string", + "description": "The ID of the user who created the proof" + }, + "created_at": { + "type": "string", + "description": "The date and time when the proof was created in the timestamp format", + "example": "1702480643" + }, + "proof": { + "type": "string", + "description": "The proof object in JSON string format", + "example": "{\"pub_signals\":[...],\"proof\":{\"pi_a\":[...],\"pi_b\":[],\"pi_c\":[...]}}" + } + } + } + } + } + ] + }, + "ProofCreate": { + "type": "object", + "required": [ + "proof" + ], + "properties": { + "proof": { + "type": "string", + "description": "The proof object in JSON string format", + "example": "{\"pub_signals\":[...],\"proof\":{\"pi_a\":[...],\"pi_b\":[],\"pi_c\":[...]}}" + } + } + }, + "ProofKey": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string", + "example": "1" + }, + "type": { + "type": "string", + "enum": [ + "proofs" + ] + } + } + } + }, + "responses": { + "internalError": { + "description": "Internal server error", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/Errors" + } + } + } + }, + "invalidAuth": { + "description": "You must provide a valid authorization params.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/Errors" + } + } + } + }, + "invalidParameter": { + "description": "One of the parameters is invalid. Refer to the response body for details.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/Errors" + } + } + } + }, + "notFound": { + "description": "Requested resource does not exist.", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/Errors" + } + } + } + } + }, + "parameters": { + "pageCursorParam": { + "in": "query", + "name": "page[cursor]", + "required": false, + "description": "A pointer to start the page of results with. To get a link to the next page, use the URL in the `links.next` field in the response, which includes the value for this parameter.", + "schema": { + "type": "string", + "example": "MTA6MjE=" + } + }, + "pageLimitParam": { + "in": "query", + "name": "page[limit]", + "required": false, + "example": 50, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 15, + "description": "Numbers of items per page to return." + } + }, + "sortingParam": { + "in": "query", + "name": "sort", + "required": false, + "example": "-time", + "schema": { + "type": "string", + "description": "Order of records on the page. Format is `[-]{columnName}`; minus sign makes the order descending. Each endpoint specifies its own set of columns to sort data by." + } + } + }, + "securitySchemes": { + "Bearer": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + } + } +} diff --git a/openapi.yaml b/openapi.yaml new file mode 100644 index 0000000..770c86c --- /dev/null +++ b/openapi.yaml @@ -0,0 +1,234 @@ +openapi: 3.0.0 +info: + version: 1.0.0 + title: Dashboard Rarime Link Service + description: '' +servers: + - url: 'https://api.demo.tokend.io' + description: dashboard-rarime-link-svc +paths: + /v1/proofs: + post: + tags: + - Proofs + summary: Create the proof + description: | + Allows to create a proof in the service database. After saving the proof, it will be accessible by its ID. + operationId: createProof + security: + - Bearer: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + data: + type: object + $ref: '#/components/schemas/ProofCreate' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Proof' + '400': + $ref: '#/components/responses/invalidParameter' + '401': + $ref: '#/components/responses/invalidAuth' + '500': + $ref: '#/components/responses/internalError' + '/v1/proofs/{id}': + get: + summary: Get Proof by ID + description: | + Returns information about the particular proof. + operationId: proofByID + tags: + - Proofs + parameters: + - in: path + name: id + required: true + description: The ID of the proof + schema: + type: string + example: 1 + responses: + '200': + description: OK + content: + application/vnd.api+json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/Proof' + '400': + $ref: '#/components/responses/invalidParameter' + '404': + $ref: '#/components/responses/notFound' + '500': + $ref: '#/components/responses/internalError' +components: + schemas: + Enum: + type: object + required: + - value + - name + properties: + value: + type: integer + example: 1 + name: + type: string + example: General + Errors: + description: 'Standard JSON:API error' + type: object + required: + - errors + properties: + errors: + type: array + description: Non empty array of errors occurred during request processing + items: + type: object + required: + - title + - status + properties: + title: + type: string + description: 'Title is a short, human-readable summary of the problem' + example: Bad Request + detail: + type: string + description: Detail is a human-readable explanation specific to this occurrence of the problem + example: Request body was expected + status: + type: integer + description: Status is the HTTP status code applicable to this problem + example: 400 + enum: + - 400 + - 401 + - 403 + - 404 + - 409 + - 500 + Proof: + allOf: + - $ref: '#/components/schemas/ProofKey' + - type: object + required: + - attributes + properties: + attributes: + type: object + required: + - creator + - created_at + - proof + properties: + creator: + type: string + description: The ID of the user who created the proof + created_at: + type: string + description: The date and time when the proof was created in the timestamp format + example: '1702480643' + proof: + type: string + description: The proof object in JSON string format + example: '{"pub_signals":[...],"proof":{"pi_a":[...],"pi_b":[],"pi_c":[...]}}' + ProofCreate: + type: object + required: + - proof + properties: + proof: + type: string + description: The proof object in JSON string format + example: '{"pub_signals":[...],"proof":{"pi_a":[...],"pi_b":[],"pi_c":[...]}}' + ProofKey: + type: object + required: + - id + - type + properties: + id: + type: string + example: '1' + type: + type: string + enum: + - proofs + responses: + internalError: + description: Internal server error + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Errors' + invalidAuth: + description: You must provide a valid authorization params. + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Errors' + invalidParameter: + description: One of the parameters is invalid. Refer to the response body for details. + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Errors' + notFound: + description: Requested resource does not exist. + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/Errors' + parameters: + pageCursorParam: + in: query + name: 'page[cursor]' + required: false + description: 'A pointer to start the page of results with. To get a link to the next page, use the URL in the `links.next` field in the response, which includes the value for this parameter.' + schema: + type: string + example: MTA6MjE= + pageLimitParam: + in: query + name: 'page[limit]' + required: false + example: 50 + schema: + type: integer + minimum: 1 + maximum: 100 + default: 15 + description: Numbers of items per page to return. + sortingParam: + in: query + name: sort + required: false + example: '-time' + schema: + type: string + description: 'Order of records on the page. Format is `[-]{columnName}`; minus sign makes the order descending. Each endpoint specifies its own set of columns to sort data by.' + securitySchemes: + Bearer: + type: http + scheme: bearer + bearerFormat: JWT