diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-08-08 07:10:59 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-08-08 07:10:59 +0800 |
commit | f6dbc239958e37a585d3f89b98eb6cd473895335 (patch) | |
tree | 5cd42d9904f4c43cef75d1afd3b062554315811e /packages/sra-api/src/api.ts | |
parent | f36a43a83f6c8ae32d36768da8c97858ef051446 (diff) | |
download | dexon-0x-contracts-f6dbc239958e37a585d3f89b98eb6cd473895335.tar.gz dexon-0x-contracts-f6dbc239958e37a585d3f89b98eb6cd473895335.tar.zst dexon-0x-contracts-f6dbc239958e37a585d3f89b98eb6cd473895335.zip |
Add GET order endpoint spec
Diffstat (limited to 'packages/sra-api/src/api.ts')
-rw-r--r-- | packages/sra-api/src/api.ts | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/packages/sra-api/src/api.ts b/packages/sra-api/src/api.ts index d80fb9b41..2cc15b297 100644 --- a/packages/sra-api/src/api.ts +++ b/packages/sra-api/src/api.ts @@ -176,7 +176,32 @@ export const api: OpenApiSpec = { responses: generateResponses( 'relayerApiOrdersResponseSchema', examples.relayerApiOrdersResponse, - `Returns a collection of 0x orders with meta-data as specified by query params`, + `A collection of 0x orders with meta-data as specified by query params`, + ), + }, + }, + '/v2/order/{orderHash}': { + get: { + description: 'Retrieves the 0x order with meta info that is associated with the hash.', + operationId: 'getOrder', + parameters: generateParameters( + [ + { + name: 'orderHash', + in: 'path', + description: 'The hash of the desired 0x order.', + example: '0xd4b103c42d2512eef3fee775e097f044291615d25f5d71e0ac70dbd49d223591', + schema: { + $ref: '#/components/schemas/orderHashSchema', + }, + }, + ], + true, + ), + responses: generateResponses( + 'relayerApiOrderSchema', + examples.relayerApiOrder, + `The order and meta info associated with the orderHash`, ), }, }, |