diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-08-09 05:00:50 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-08-09 05:00:50 +0800 |
commit | 9aacceb0e4549a7a72cae7cbf74ea819db184d80 (patch) | |
tree | 059e0de4b423d78e50d6175a86d11fd541ab0244 /packages/sra-api/src/api.ts | |
parent | c9e1b7c5dc4eebf447fdc97568f08db0e2546904 (diff) | |
download | dexon-sol-tools-9aacceb0e4549a7a72cae7cbf74ea819db184d80.tar.gz dexon-sol-tools-9aacceb0e4549a7a72cae7cbf74ea819db184d80.tar.zst dexon-sol-tools-9aacceb0e4549a7a72cae7cbf74ea819db184d80.zip |
Remove tests directory, use swagger api, make json api compliant
Diffstat (limited to 'packages/sra-api/src/api.ts')
-rw-r--r-- | packages/sra-api/src/api.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/packages/sra-api/src/api.ts b/packages/sra-api/src/api.ts index 5973e11cd..e578ddc74 100644 --- a/packages/sra-api/src/api.ts +++ b/packages/sra-api/src/api.ts @@ -1,12 +1,10 @@ -import { schemas } from '@0xproject/json-schemas'; import { OpenApiSpec } from '@loopback/openapi-v3-types'; import { examples } from './examples'; +import { schemas } from './json-schemas'; import { md } from './md'; import { generateParameters } from './parameters'; import { generateResponses } from './responses'; -// We need to replace the `$ref`s to be OpenAPI compliant. -const openApiSchemas = JSON.parse(JSON.stringify(schemas).replace(/(\/\w+)/g, match => `#/components/schemas${match}`)); export const api: OpenApiSpec = { openapi: '3.0.0', @@ -298,6 +296,6 @@ export const api: OpenApiSpec = { }, }, components: { - schemas: openApiSchemas, + schemas, }, }; |