From ed42e994efbc45465f7352790f5c17ee3f79e03f Mon Sep 17 00:00:00 2001 From: Dom Harrington Date: Mon, 13 Aug 2018 17:57:28 -0700 Subject: [PATCH] Provide a first pass at a `json` data type Still broken: - type says 'string' - textarea needs styling - need to confirm it works with explorer disabled --- .../api-explorer/__tests__/Params.test.jsx | 29 +++++++ .../__tests__/lib/oas-to-har.test.js | 86 +++++++++++++++++++ packages/api-explorer/src/Params.jsx | 2 + .../src/form-components/SchemaField.jsx | 3 + packages/api-explorer/src/lib/oas-to-har.js | 23 ++++- 5 files changed, 139 insertions(+), 4 deletions(-) diff --git a/packages/api-explorer/__tests__/Params.test.jsx b/packages/api-explorer/__tests__/Params.test.jsx index ad71232a1..d0def3840 100644 --- a/packages/api-explorer/__tests__/Params.test.jsx +++ b/packages/api-explorer/__tests__/Params.test.jsx @@ -7,6 +7,7 @@ const Description = require('../src/form-components/DescriptionField'); const createParams = require('../src/Params'); const Oas = require('../src/lib/Oas'); +const { Operation } = Oas; const petstore = require('./fixtures/petstore/oas.json'); const oas = new Oas(petstore); @@ -60,6 +61,34 @@ test('boolean should render as