Merge branch 'master' into master

This commit is contained in:
conorlennon
2017-11-24 08:11:03 +00:00
committed by GitHub
15 changed files with 67 additions and 30 deletions

View File

@@ -81,7 +81,7 @@ export default class Auths extends React.Component {
}).toArray()
}
<div className="auth-btn-wrapper">
<Button className="btn modal-btn auth" onClick={ this.close }>Done</Button>
<Button className="btn modal-btn auth btn-done" onClick={ this.close }>Done</Button>
{
nonOauthDefinitions.size === authorizedAuth.size ? <Button className="btn modal-btn auth" onClick={ this.logoutClick }>Logout</Button>
: <Button type="submit" className="btn modal-btn auth authorize">Authorize</Button>

View File

@@ -26,6 +26,8 @@ export default class ObjectModel extends Component {
return null
}
const { showExtensions } = getConfigs()
let description = schema.get("description")
let properties = schema.get("properties")
let additionalProperties = schema.get("additionalProperties")
@@ -99,6 +101,30 @@ export default class ObjectModel extends Component {
</tr>)
}).toArray()
}
{
// empty row befor extensions...
!showExtensions ? null : <tr>&nbsp;</tr>
}
{
!showExtensions ? null :
schema.entrySeq().map(
([key, value]) => {
if(key.slice(0,2) !== "x-") {
return
}
const normalizedValue = !value ? null : value.toJS ? value.toJS() : value
return (<tr key={key} style={{ color: "#777" }}>
<td>
{ key }
</td>
<td style={{ verticalAlign: "top" }}>
{ JSON.stringify(normalizedValue) }
</td>
</tr>)
}).toArray()
}
{
!additionalProperties || !additionalProperties.size ? null
: <tr>

View File

@@ -2,9 +2,11 @@ import React from "react"
import PropTypes from "prop-types"
export const OperationExtRow = ({ xKey, xVal }) => {
const xNormalizedValue = !xVal ? null : xVal.toJS ? xVal.toJS() : xVal
return (<tr>
<td>{ xKey }</td>
<td>{ String(xVal) }</td>
<td>{ JSON.stringify(xNormalizedValue) }</td>
</tr>)
}
OperationExtRow.propTypes = {

View File

@@ -5,6 +5,10 @@
padding: 10px 0;
justify-content: center;
.btn-done {
margin-right: 1em;
}
}
.auth-wrapper

View File

@@ -19,7 +19,7 @@ table
&:first-of-type
{
width: 124px;
width: 174px;
padding: 0 0 0 2em;
}
}