From 6121a6d2bffed7187a875148a5e36d0b4b7645ac Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 8 Aug 2018 14:28:09 -0700 Subject: Add to changelog and fix OrderBook typo --- packages/sra-api/CHANGELOG.json | 12 +++++++++++- packages/sra-api/src/api.ts | 6 +++--- packages/sra-api/src/examples/index.ts | 4 ++-- packages/sra-api/src/examples/relayerApiOrderBookResponse.ts | 2 +- packages/sra-api/src/json-schemas.ts | 4 ++-- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/packages/sra-api/CHANGELOG.json b/packages/sra-api/CHANGELOG.json index fe51488c7..f6d6c25e1 100644 --- a/packages/sra-api/CHANGELOG.json +++ b/packages/sra-api/CHANGELOG.json @@ -1 +1,11 @@ -[] +[ + { + "version": "1.0.1-rc.4", + "changes": [ + { + "note": "Add inital spec for SRA v2", + "pr": 916 + } + ] + } +] diff --git a/packages/sra-api/src/api.ts b/packages/sra-api/src/api.ts index e578ddc74..c2236fda5 100644 --- a/packages/sra-api/src/api.ts +++ b/packages/sra-api/src/api.ts @@ -206,7 +206,7 @@ export const api: OpenApiSpec = { '/v2/orderbook': { get: { description: `Retrieves the orderbook for a given asset pair. This endpoint should be [paginated](#section/Pagination). Bids will be sorted in descending order by price, and asks will be sorted in ascending order by price. Within the price sorted orders, the orders are further sorted by _taker fee price_ which is defined as the **takerFee** divided by **takerTokenAmount**. After _taker fee price_, orders are to be sorted by expiration in ascending order. The way pagination works for this endpoint is that the **page** and **per_page** query params apply to both \`bids\` and \`asks\` collections, and if \`page\` * \`per_page\` > \`total\` for a certain collection, the \`records\` for that collection should just be empty. `, - operationId: 'getOrderBook', + operationId: 'getOrderbook', parameters: generateParameters( [ { @@ -233,8 +233,8 @@ export const api: OpenApiSpec = { true, ), responses: generateResponses( - 'relayerApiOrderBookResponseSchema', - examples.relayerApiOrderBookResponse, + 'relayerApiOrderbookResponseSchema', + examples.relayerApiOrderbookResponse, `The sorted order book for the specified asset pair.`, ), }, diff --git a/packages/sra-api/src/examples/index.ts b/packages/sra-api/src/examples/index.ts index cdc4fac53..dcf9b13eb 100644 --- a/packages/sra-api/src/examples/index.ts +++ b/packages/sra-api/src/examples/index.ts @@ -2,7 +2,7 @@ import { validationError } from './errors'; import { relayerApiAssetDataPairsResponse } from './relayerApiAssetDataPairsResponse'; import { relayerApiFeeRecipientsResponse } from './relayerApiFeeRecipientsResponse'; import { relayerApiOrder } from './relayerApiOrder'; -import { relayerApiOrderBookResponse } from './relayerApiOrderBookResponse'; +import { relayerApiOrderbookResponse } from './relayerApiOrderbookResponse'; import { relayerApiOrderConfigPayload } from './relayerApiOrderConfigPayload'; import { relayerApiOrderConfigResponse } from './relayerApiOrderConfigResponse'; import { relayerApiOrdersResponse } from './relayerApiOrdersResponse'; @@ -13,7 +13,7 @@ export const examples = { relayerApiAssetDataPairsResponse, relayerApiFeeRecipientsResponse, relayerApiOrder, - relayerApiOrderBookResponse, + relayerApiOrderbookResponse, relayerApiOrderConfigPayload, relayerApiOrderConfigResponse, relayerApiOrdersResponse, diff --git a/packages/sra-api/src/examples/relayerApiOrderBookResponse.ts b/packages/sra-api/src/examples/relayerApiOrderBookResponse.ts index 4e1e7a8eb..40c09eff9 100644 --- a/packages/sra-api/src/examples/relayerApiOrderBookResponse.ts +++ b/packages/sra-api/src/examples/relayerApiOrderBookResponse.ts @@ -1,4 +1,4 @@ -export const relayerApiOrderBookResponse = { +export const relayerApiOrderbookResponse = { bids: { total: 325, page: 2, diff --git a/packages/sra-api/src/json-schemas.ts b/packages/sra-api/src/json-schemas.ts index 5b222a43f..173a04bfb 100644 --- a/packages/sra-api/src/json-schemas.ts +++ b/packages/sra-api/src/json-schemas.ts @@ -17,7 +17,7 @@ const { relayerApiOrdersSchema, relayerApiOrderConfigPayloadSchema, relayerApiOrderConfigResponseSchema, - relayerApiOrderBookResponseSchema, + relayerApiOrderbookResponseSchema, relayerApiAssetDataPairsResponseSchema, relayerApiAssetDataTradeInfoSchema, relayerApiOrdersChannelSubscribeSchema, @@ -43,7 +43,7 @@ const usedSchemas = { relayerApiOrdersSchema, relayerApiOrderConfigPayloadSchema, relayerApiOrderConfigResponseSchema, - relayerApiOrderBookResponseSchema, + relayerApiOrderbookResponseSchema, relayerApiAssetDataPairsResponseSchema, relayerApiAssetDataTradeInfoSchema, relayerApiOrdersChannelSubscribeSchema, -- cgit