From 9efb6dfa953a1cf081578e2ae27df6b4fee76b68 Mon Sep 17 00:00:00 2001 From: Leonel Garcia Date: Tue, 26 Feb 2019 13:06:45 -0500 Subject: [PATCH 1/5] [api] refs #16 - Add specs for /api/transactions/history/to/{address}/observation --- lagcleaner_specs.yml | 60 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 lagcleaner_specs.yml diff --git a/lagcleaner_specs.yml b/lagcleaner_specs.yml new file mode 100644 index 0000000..872ef9f --- /dev/null +++ b/lagcleaner_specs.yml @@ -0,0 +1,60 @@ +openapi: 3.0.0 +info: + title: Python to .Net + description: Still whitout description. + version: 0.25.1 +servers: + - url: 'http://www.skycoin.net' + description: Main Skycoin server + - url: 'http://staging.node.skycoin.net' + description: Internal staging server for developer. +components: + securitySchemes: + CsrfTokenAuth: + type: apiKey + in: header + name: X-CSRF-TOKEN + schemas: + genericError: + description: This is a generic error that should be default response + type: object + properties: + code: + type: integer + format: int64 + message: + type: string +paths: +# - 16 + /api/transactions/history/to/{address}/observation: + post: + parameters: + - in: path + name: address + required: true + schema: + type: string + description: Address to which funds are transferred. + + summary: Starts observation of the transactions. + + description: Should starts observation of the transactions that transfer fund to the address, and affect the result of the [GET] /api/transactions/history/to/{address}. + + security: + - CsrfTokenAuth: [] + + responses: + '200': + description: Successfully stored in observation list. + + '409': + description: Transactions to the address are already observed. + content: + application/json: + schema: + type: array + items: + type: string + + default: + $ref: '#/components/schemas/genericError' From 5fa2b0cc651500558bc65f4194195f4d7844641d Mon Sep 17 00:00:00 2001 From: Leonel Garcia Date: Tue, 26 Feb 2019 13:11:11 -0500 Subject: [PATCH 2/5] [api] refs #17 - Add specs for /api/transactions/history/from/{address}/observation --- lagcleaner_specs.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/lagcleaner_specs.yml b/lagcleaner_specs.yml index 872ef9f..3200e00 100644 --- a/lagcleaner_specs.yml +++ b/lagcleaner_specs.yml @@ -58,3 +58,36 @@ paths: default: $ref: '#/components/schemas/genericError' + # - 17 + /api/transactions/history/from/{address}/observation: + post: + parameters: + - in: path + name: address + required: true + schema: + type: string + description: Address from which funds are transferred. + + summary: Starts observation of the transactions. + + description: Should starts observation of the transactions that transfer fund from the address, and affect the result of the [GET] /api/transactions/history/from/{address}. + + security: + - CsrfTokenAuth: [] + + responses: + '200': + description: Successfully stored in observation list. + + '409': + description: Transactions from the address are already observed. + content: + application/json: + schema: + type: array + items: + type: string + + default: + $ref: '#/components/schemas/genericError' From df7d9216d7aa65be805067b1dca3efea59322764 Mon Sep 17 00:00:00 2001 From: Leonel Garcia Date: Tue, 26 Feb 2019 13:14:52 -0500 Subject: [PATCH 3/5] [api] refs #18 - Add specs for /api/transactions/broadcast/{operationId} --- lagcleaner_specs.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/lagcleaner_specs.yml b/lagcleaner_specs.yml index 3200e00..445981c 100644 --- a/lagcleaner_specs.yml +++ b/lagcleaner_specs.yml @@ -91,3 +91,36 @@ paths: default: $ref: '#/components/schemas/genericError' + # - 18 + /api/transactions/broadcast/{operationId}: + delete: + parameters: + - in: path + name: operationId + required: true + schema: + type: string + description: Specified transaction from the broadcasted transactions. + + summary: Remove an specified transaction from the broadcasted transactions. + + description: Should remove specified transaction from the broadcasted transactions, and affect transactions returned by the [GET] /api/transactions/broadcast/{operatioId}. + + security: + - CsrfTokenAuth: [] + + responses: + '200': + description: Successfully removed from broadcasted transactions list. + + '204': + description: Specifieed transaction not found. + content: + application/json: + schema: + type: array + items: + type: string + + default: + $ref: '#/components/schemas/genericError' \ No newline at end of file From 5dedb7dda90847dfdd6d9f1f500895bc2cf26515 Mon Sep 17 00:00:00 2001 From: Leonel Garcia Date: Tue, 26 Feb 2019 14:40:34 -0500 Subject: [PATCH 4/5] [api] refs #16 #17 #18 - Error format changed Changed to: 'status_code': description: Descrip. content: application/json: schema: type: string --- lagcleaner_specs.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lagcleaner_specs.yml b/lagcleaner_specs.yml index 445981c..28920f5 100644 --- a/lagcleaner_specs.yml +++ b/lagcleaner_specs.yml @@ -52,9 +52,7 @@ paths: content: application/json: schema: - type: array - items: - type: string + type: string default: $ref: '#/components/schemas/genericError' @@ -85,9 +83,7 @@ paths: content: application/json: schema: - type: array - items: - type: string + type: string default: $ref: '#/components/schemas/genericError' @@ -118,9 +114,7 @@ paths: content: application/json: schema: - type: array - items: - type: string + type: string default: $ref: '#/components/schemas/genericError' \ No newline at end of file From 01a1d62a5b389dfac85a544080afc26bcb89aa30 Mon Sep 17 00:00:00 2001 From: Leonel Garcia Date: Tue, 26 Feb 2019 14:59:23 -0500 Subject: [PATCH 5/5] [api] refs #16 #17 #18 - Erased errors specifications --- lagcleaner_specs.yml | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/lagcleaner_specs.yml b/lagcleaner_specs.yml index 28920f5..9937547 100644 --- a/lagcleaner_specs.yml +++ b/lagcleaner_specs.yml @@ -47,13 +47,6 @@ paths: '200': description: Successfully stored in observation list. - '409': - description: Transactions to the address are already observed. - content: - application/json: - schema: - type: string - default: $ref: '#/components/schemas/genericError' # - 17 @@ -77,14 +70,7 @@ paths: responses: '200': description: Successfully stored in observation list. - - '409': - description: Transactions from the address are already observed. - content: - application/json: - schema: - type: string - + default: $ref: '#/components/schemas/genericError' # - 18 @@ -108,13 +94,6 @@ paths: responses: '200': description: Successfully removed from broadcasted transactions list. - - '204': - description: Specifieed transaction not found. - content: - application/json: - schema: - type: string - + default: $ref: '#/components/schemas/genericError' \ No newline at end of file