diff --git a/packages/api-explorer-ui/__tests__/CodeSampleResponse.test.jsx b/packages/api-explorer-ui/__tests__/CodeSampleResponse.test.jsx
index d732f85ab..6d8e2c211 100644
--- a/packages/api-explorer-ui/__tests__/CodeSampleResponse.test.jsx
+++ b/packages/api-explorer-ui/__tests__/CodeSampleResponse.test.jsx
@@ -66,7 +66,6 @@ describe('hideResults', () => {
const codeSampleResponseTabs = shallow();
expect(codeSampleResponseTabs.state('result')).toEqual({
- isBinary: false,
method: 'POST',
requestHeaders: 'Authorization : Bearer api-key',
responseHeaders: 'content-disposition,application/json',
@@ -131,7 +130,6 @@ describe('Results body', () => {
test('should not display responseBody if isBinary is true', () => {
const props2 = {
result: {
- init: true,
isBinary: true,
method: 'POST',
requestHeaders: 'Authorization : Bearer api-key',
@@ -151,8 +149,6 @@ describe('Results body', () => {
test('should display message if OAuth is incorrect or expired ', () => {
const props3 = {
result: {
- init: true,
- isBinary: true,
method: 'POST',
requestHeaders: 'Authorization : Bearer api-key',
responseHeaders: 'content-disposition,application/json',
diff --git a/packages/api-explorer-ui/src/CodeSampleResponse.jsx b/packages/api-explorer-ui/src/CodeSampleResponse.jsx
index d9488ad1c..c944cc2c4 100644
--- a/packages/api-explorer-ui/src/CodeSampleResponse.jsx
+++ b/packages/api-explorer-ui/src/CodeSampleResponse.jsx
@@ -51,9 +51,9 @@ class CodeSampleResponse extends React.Component {
on: result !== null,
})}
>
-
+
- {result === null ? null : (
+ {result !== null && (
)}
- {showCodeResults(operation).length === 0 && (
+ {showCodeResults(operation).length === 0 &&
+ result === null && (
{oas[extensions.EXPLORER_ENABLED] ? (
'Try the API to see Results'
diff --git a/packages/api-explorer-ui/src/lib/get-path.js b/packages/api-explorer-ui/src/lib/get-path.js
index 13fa60272..4af53ed6f 100644
--- a/packages/api-explorer-ui/src/lib/get-path.js
+++ b/packages/api-explorer-ui/src/lib/get-path.js
@@ -1,4 +1,3 @@
module.exports = function getPath(swagger, doc) {
- // console.log(swagger);
return doc.swagger ? swagger.paths[doc.swagger.path] : { parameters: [] };
};
diff --git a/packages/readme-syntax-highlighter/codemirror.js b/packages/readme-syntax-highlighter/codemirror.js
index 73472a86d..f10047e39 100644
--- a/packages/readme-syntax-highlighter/codemirror.js
+++ b/packages/readme-syntax-highlighter/codemirror.js
@@ -2,8 +2,9 @@ const CodeMirror = require('codemirror');
require('codemirror/addon/runmode/runmode');
require('codemirror/mode/meta.js');
-require('codemirror/mode/shell/shell');
require('codemirror/mode/ruby/ruby');
+require('codemirror/mode/javascript/javascript');
+require('codemirror/mode/shell/shell');
require('codemirror/mode/python/python');
function esc(str) {