aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sra-api/src/api.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-08-01 07:37:51 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-08-01 07:37:51 +0800
commit4aff9515d807feb5fc30431d109d503a6c52f0cd (patch)
tree49c98689c083cdb0fd3992768d924a92ccfbd243 /packages/sra-api/src/api.ts
parent162fe797fcd4c41d8d84184ca5c0352c8342937b (diff)
downloaddexon-sol-tools-4aff9515d807feb5fc30431d109d503a6c52f0cd.tar.gz
dexon-sol-tools-4aff9515d807feb5fc30431d109d503a6c52f0cd.tar.zst
dexon-sol-tools-4aff9515d807feb5fc30431d109d503a6c52f0cd.zip
Get schema tests running (not crashiing)
Diffstat (limited to 'packages/sra-api/src/api.ts')
-rw-r--r--packages/sra-api/src/api.ts51
1 files changed, 51 insertions, 0 deletions
diff --git a/packages/sra-api/src/api.ts b/packages/sra-api/src/api.ts
index c05311516..fd64ab1d7 100644
--- a/packages/sra-api/src/api.ts
+++ b/packages/sra-api/src/api.ts
@@ -1,3 +1,4 @@
+import { schemas } from '@0xproject/json-schemas';
import { OpenApiSpec } from '@loopback/openapi-v3-types';
export const api: OpenApiSpec = {
@@ -14,6 +15,55 @@ export const api: OpenApiSpec = {
// TODO: Use relayer registry information here?
],
paths: {
+ '/orders': {
+ get: {
+ summary: 'List all pets',
+ operationId: 'listPets2',
+ tags: ['pets'],
+ parameters: [
+ {
+ name: 'limit',
+ in: 'query',
+ description: 'How many items to return at one time (max 100)',
+ required: false,
+ schema: {
+ type: 'integer',
+ format: 'int32',
+ },
+ },
+ ],
+ responses: {
+ '200': {
+ description: 'An paged array of pets',
+ headers: {
+ 'x-next': {
+ description: 'A link to the next page of responses',
+ schema: {
+ type: 'string',
+ },
+ },
+ },
+ content: {
+ 'application/json': {
+ schema: {
+ $ref: '#/components/schemas/Pets',
+ },
+ },
+ },
+ },
+ default: {
+ description: 'unexpected error',
+ content: {
+ 'application/json': {
+ schema: {
+ $ref: '#/components/schemas/Error',
+ },
+ },
+ },
+ },
+ },
+ },
+ },
'/pets': {
get: {
summary: 'List all pets',
@@ -141,6 +191,7 @@ export const api: OpenApiSpec = {
},
},
},
+ // Orderbook: schemas.relayerApiOrderBookResponseSchema,
Pets: {
type: 'array',
items: {