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

Commit

Permalink
Prettier updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Harrington committed Oct 30, 2017
1 parent 00f7e2f commit 4c934d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/api-explorer-ui/src/lib/oas-to-har.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ module.exports = (
if (schema.schema && Object.keys(schema.schema).length) {
// If there is formData, then the type is application/x-www-form-urlencoded
if (Object.keys(formData.formData).length) {
har.postData.text = querystring.stringify(formData.formData)
} else if (Object.keys(formData.body).length) { // Default to JSON.stringify
har.postData.text = querystring.stringify(formData.formData);
} else if (Object.keys(formData.body).length) {
// Default to JSON.stringify
har.postData.text = JSON.stringify(formData.body);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = pathOperation => {

if (!schema) return null;

const type = schema.type === 'application/x-www-form-urlencoded' ? 'formData' : 'body'
const type = schema.type === 'application/x-www-form-urlencoded' ? 'formData' : 'body';

return {
type,
Expand Down

0 comments on commit 4c934d9

Please sign in to comment.