Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Make changes from broken mereg
Browse files Browse the repository at this point in the history
  • Loading branch information
uppal101 committed Oct 27, 2017
1 parent e20642f commit 04e4704
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ describe('hideResults', () => {
const codeSampleResponseTabs = shallow(<CodeSampleResponseTabs {...props} oas={oas} />);

expect(codeSampleResponseTabs.state('result')).toEqual({
isBinary: false,
method: 'POST',
requestHeaders: 'Authorization : Bearer api-key',
responseHeaders: 'content-disposition,application/json',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down
7 changes: 4 additions & 3 deletions packages/api-explorer-ui/src/CodeSampleResponse.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ class CodeSampleResponse extends React.Component {
on: result !== null,
})}
>
<div className="hub-reference-result-slider">
<div className="hub-reference-results-slider">
<div className="hub-reference-results-explorer code-sample">
{result === null ? null : (
{result !== null && (
<span>
<ul className="code-sample-tabs hub-reference-results-header">
<a
Expand Down Expand Up @@ -256,7 +256,8 @@ class CodeSampleResponse extends React.Component {
</div>
</span>
)}
{showCodeResults(operation).length === 0 && (
{showCodeResults(operation).length === 0 &&
result === null && (
<div className="hub-no-code">
{oas[extensions.EXPLORER_ENABLED] ? (
'Try the API to see Results'
Expand Down
1 change: 0 additions & 1 deletion packages/api-explorer-ui/src/lib/get-path.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
module.exports = function getPath(swagger, doc) {
// console.log(swagger);
return doc.swagger ? swagger.paths[doc.swagger.path] : { parameters: [] };
};
3 changes: 2 additions & 1 deletion packages/readme-syntax-highlighter/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 04e4704

Please sign in to comment.