Merge branch 'master' into bug/3505-schema-title-in-array-schemes
This commit is contained in:
22
dist/swagger-ui-bundle.js
vendored
22
dist/swagger-ui-bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/swagger-ui-bundle.js.map
vendored
2
dist/swagger-ui-bundle.js.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;;;;;AAoyKA;;;;;;AAy+EA;;;;;;;;;;;;;;;;;;;;;;;;;;AA00TA;;;;;;;;;;;;;;AAs8JA;;;;;;;;;AA+5oBA;;;;;AA2lQA;AAm4DA;;;;;;AAo4YA;;;;;;AA0iaA;AAumvBA","sourceRoot":""}
|
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;;;;;AAoyKA;;;;;;AAy+EA;;;;;;;;;;;;;;;;;;;;;;;;;;AAw1TA;;;;;;;;;;;;;;AAs8JA;;;;;;;;;AAy6oBA;;;;;AAqqQA;AAm4DA;;;;;;AAo4YA;;;;;;AA8jaA;AAumvBA","sourceRoot":""}
|
||||||
2
dist/swagger-ui-standalone-preset.js
vendored
2
dist/swagger-ui-standalone-preset.js
vendored
File diff suppressed because one or more lines are too long
4
dist/swagger-ui.js
vendored
4
dist/swagger-ui.js
vendored
File diff suppressed because one or more lines are too long
2
dist/swagger-ui.js.map
vendored
2
dist/swagger-ui.js.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AAwpcA","sourceRoot":""}
|
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AAyvcA","sourceRoot":""}
|
||||||
@@ -15,7 +15,7 @@ export default class ArrayModel extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
let { getComponent, required, schema, depth, expandDepth, name } = this.props
|
let { getComponent, schema, depth, expandDepth, name } = this.props
|
||||||
let items = schema.get("items")
|
let items = schema.get("items")
|
||||||
let title = schema.get("title") || name
|
let title = schema.get("title") || name
|
||||||
let properties = schema.filter( ( v, key) => ["type", "items", "$$ref"].indexOf(key) === -1 )
|
let properties = schema.filter( ( v, key) => ["type", "items", "$$ref"].indexOf(key) === -1 )
|
||||||
@@ -31,7 +31,7 @@ export default class ArrayModel extends Component {
|
|||||||
return <span className="model">
|
return <span className="model">
|
||||||
<ModelCollapse title={titleEl} collapsed={ depth > expandDepth } collapsedContent="[...]">
|
<ModelCollapse title={titleEl} collapsed={ depth > expandDepth } collapsedContent="[...]">
|
||||||
[
|
[
|
||||||
<span><Model { ...this.props } schema={ items } required={ false }/></span>
|
<span><Model { ...this.props } schema={ items } required={ false } depth={ depth + 1 } /></span>
|
||||||
]
|
]
|
||||||
{
|
{
|
||||||
properties.size ? <span>
|
properties.size ? <span>
|
||||||
@@ -41,7 +41,6 @@ export default class ArrayModel extends Component {
|
|||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
</ModelCollapse>
|
</ModelCollapse>
|
||||||
{ required && <span style={{ color: "red" }}>*</span>}
|
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ export default class ObjectModel extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
let { schema, name, isRef, getComponent, depth, ...props } = this.props
|
let { schema, name, isRef, getComponent, depth, expandDepth, specSelectors, ...props } = this.props
|
||||||
let { expandDepth, specSelectors } = this.props
|
let { isOAS3 } = specSelectors
|
||||||
|
|
||||||
let description = schema.get("description")
|
let description = schema.get("description")
|
||||||
let properties = schema.get("properties")
|
let properties = schema.get("properties")
|
||||||
let additionalProperties = schema.get("additionalProperties")
|
let additionalProperties = schema.get("additionalProperties")
|
||||||
@@ -30,7 +31,10 @@ export default class ObjectModel extends Component {
|
|||||||
const Model = getComponent("Model")
|
const Model = getComponent("Model")
|
||||||
const ModelCollapse = getComponent("ModelCollapse")
|
const ModelCollapse = getComponent("ModelCollapse")
|
||||||
|
|
||||||
const JumpToPathSection = ({ name }) => <span className="model-jump-to-path"><JumpToPath path={`definitions.${name}`} /></span>
|
const JumpToPathSection = ({ name }) => {
|
||||||
|
const path = isOAS3 && isOAS3() ? `components.schemas.${name}` : `definitions.${name}`
|
||||||
|
return <span className="model-jump-to-path"><JumpToPath path={path} /></span>
|
||||||
|
}
|
||||||
const collapsedContent = (<span>
|
const collapsedContent = (<span>
|
||||||
<span>{ braceOpen }</span>...<span>{ braceClose }</span>
|
<span>{ braceOpen }</span>...<span>{ braceClose }</span>
|
||||||
{
|
{
|
||||||
@@ -55,7 +59,7 @@ export default class ObjectModel extends Component {
|
|||||||
}
|
}
|
||||||
<span className="inner-object">
|
<span className="inner-object">
|
||||||
{
|
{
|
||||||
<table className="model" style={{ marginLeft: "2em" }}><tbody>
|
<table className="model"><tbody>
|
||||||
{
|
{
|
||||||
!description ? null : <tr style={{ color: "#999", fontStyle: "italic" }}>
|
!description ? null : <tr style={{ color: "#999", fontStyle: "italic" }}>
|
||||||
<td>description:</td>
|
<td>description:</td>
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ export default class Operation extends PureComponent {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Collapse isOpened={shown} animated>
|
<Collapse isOpened={shown}>
|
||||||
<div className="opblock-body">
|
<div className="opblock-body">
|
||||||
{ deprecated && <h4 className="opblock-title_normal"> Warning: Deprecated</h4>}
|
{ deprecated && <h4 className="opblock-title_normal"> Warning: Deprecated</h4>}
|
||||||
{ description &&
|
{ description &&
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ export default class ParameterRow extends Component {
|
|||||||
render() {
|
render() {
|
||||||
let {param, onChange, getComponent, isExecute, fn, onChangeConsumes, specSelectors, pathMethod} = this.props
|
let {param, onChange, getComponent, isExecute, fn, onChangeConsumes, specSelectors, pathMethod} = this.props
|
||||||
|
|
||||||
|
let { isOAS3 } = specSelectors
|
||||||
|
|
||||||
// const onChangeWrapper = (value) => onChange(param, value)
|
// const onChangeWrapper = (value) => onChange(param, value)
|
||||||
const JsonSchemaForm = getComponent("JsonSchemaForm")
|
const JsonSchemaForm = getComponent("JsonSchemaForm")
|
||||||
const ParamBody = getComponent("ParamBody")
|
const ParamBody = getComponent("ParamBody")
|
||||||
@@ -95,6 +97,9 @@ export default class ParameterRow extends Component {
|
|||||||
{ !required ? null : <span style={{color: "red"}}> *</span> }
|
{ !required ? null : <span style={{color: "red"}}> *</span> }
|
||||||
</div>
|
</div>
|
||||||
<div className="parameter__type">{ param.get("type") } { itemType && `[${itemType}]` }</div>
|
<div className="parameter__type">{ param.get("type") } { itemType && `[${itemType}]` }</div>
|
||||||
|
<div className="parameter__deprecated">
|
||||||
|
{ isOAS3 && isOAS3() && param.get("deprecated") ? "deprecated": null }
|
||||||
|
</div>
|
||||||
<div className="parameter__in">({ param.get("in") })</div>
|
<div className="parameter__in">({ param.get("in") })</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,12 @@ export default class Primitive extends Component {
|
|||||||
static propTypes = {
|
static propTypes = {
|
||||||
schema: PropTypes.object.isRequired,
|
schema: PropTypes.object.isRequired,
|
||||||
getComponent: PropTypes.func.isRequired,
|
getComponent: PropTypes.func.isRequired,
|
||||||
required: PropTypes.bool
|
name: PropTypes.string,
|
||||||
|
depth: PropTypes.number
|
||||||
}
|
}
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
let { schema, getComponent, required } = this.props
|
let { schema, getComponent, name, depth } = this.props
|
||||||
|
|
||||||
if(!schema || !schema.get) {
|
if(!schema || !schema.get) {
|
||||||
// don't render if schema isn't correctly formed
|
// don't render if schema isn't correctly formed
|
||||||
@@ -24,32 +25,34 @@ export default class Primitive extends Component {
|
|||||||
let enumArray = schema.get("enum")
|
let enumArray = schema.get("enum")
|
||||||
let description = schema.get("description")
|
let description = schema.get("description")
|
||||||
let properties = schema.filter( ( v, key) => ["enum", "type", "format", "description", "$$ref"].indexOf(key) === -1 )
|
let properties = schema.filter( ( v, key) => ["enum", "type", "format", "description", "$$ref"].indexOf(key) === -1 )
|
||||||
let style = required ? { fontWeight: "bold" } : {}
|
|
||||||
const Markdown = getComponent("Markdown")
|
const Markdown = getComponent("Markdown")
|
||||||
const EnumModel = getComponent("EnumModel")
|
const EnumModel = getComponent("EnumModel")
|
||||||
|
|
||||||
return <span className="prop">
|
return <span className="model">
|
||||||
<span className="prop-type" style={ style }>{ type }</span> { required && <span style={{ color: "red" }}>*</span>}
|
<span className="prop">
|
||||||
{ format && <span className="prop-format">(${format})</span>}
|
{ name && <span className={`${depth === 1 && "model-title"} prop-name`}>{ name }</span> }
|
||||||
{
|
<span className="prop-type">{ type }</span>
|
||||||
properties.size ? properties.entrySeq().map( ( [ key, v ] ) => <span key={`${key}-${v}`} style={ propStyle }>
|
{ format && <span className="prop-format">(${format})</span>}
|
||||||
<br />{ key }: { String(v) }</span>)
|
{
|
||||||
: null
|
properties.size ? properties.entrySeq().map( ( [ key, v ] ) => <span key={`${key}-${v}`} style={ propStyle }>
|
||||||
}
|
<br />{ key }: { String(v) }</span>)
|
||||||
{
|
: null
|
||||||
!description ? null :
|
}
|
||||||
<Markdown source={ description } />
|
{
|
||||||
}
|
!description ? null :
|
||||||
{
|
<Markdown source={ description } />
|
||||||
xml && xml.size ? (<span><br /><span style={ propStyle }>xml:</span>
|
}
|
||||||
{
|
{
|
||||||
xml.entrySeq().map( ( [ key, v ] ) => <span key={`${key}-${v}`} style={ propStyle }><br/> {key}: { String(v) }</span>).toArray()
|
xml && xml.size ? (<span><br /><span style={ propStyle }>xml:</span>
|
||||||
}
|
{
|
||||||
</span>): null
|
xml.entrySeq().map( ( [ key, v ] ) => <span key={`${key}-${v}`} style={ propStyle }><br/> {key}: { String(v) }</span>).toArray()
|
||||||
}
|
}
|
||||||
{
|
</span>): null
|
||||||
enumArray && <EnumModel value={ enumArray } getComponent={ getComponent } />
|
}
|
||||||
}
|
{
|
||||||
|
enumArray && <EnumModel value={ enumArray } getComponent={ getComponent } />
|
||||||
|
}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,7 +150,6 @@ export const authorizeRequest = ( data ) => ( { fn, authActions, errActions, aut
|
|||||||
|
|
||||||
let _headers = Object.assign({
|
let _headers = Object.assign({
|
||||||
"Accept":"application/json, text/plain, */*",
|
"Accept":"application/json, text/plain, */*",
|
||||||
"Access-Control-Allow-Origin": "*",
|
|
||||||
"Content-Type": "application/x-www-form-urlencoded"
|
"Content-Type": "application/x-www-form-urlencoded"
|
||||||
}, headers)
|
}, headers)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import PropTypes from "prop-types"
|
|||||||
import { OAS3ComponentWrapFactory } from "../helpers"
|
import { OAS3ComponentWrapFactory } from "../helpers"
|
||||||
import { Model } from "core/components/model"
|
import { Model } from "core/components/model"
|
||||||
|
|
||||||
|
|
||||||
class ModelComponent extends Component {
|
class ModelComponent extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
schema: PropTypes.object.isRequired,
|
schema: PropTypes.object.isRequired,
|
||||||
|
|||||||
@@ -699,7 +699,6 @@ body
|
|||||||
.renderedMarkdown {
|
.renderedMarkdown {
|
||||||
p {
|
p {
|
||||||
@include text_body();
|
@include text_body();
|
||||||
font-size: 14px;
|
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,8 +227,6 @@ span
|
|||||||
{
|
{
|
||||||
> span.model
|
> span.model
|
||||||
{
|
{
|
||||||
padding: 0 0 0 10px;
|
|
||||||
|
|
||||||
.brace-close
|
.brace-close
|
||||||
{
|
{
|
||||||
padding: 0 0 0 10px;
|
padding: 0 0 0 10px;
|
||||||
@@ -236,6 +234,12 @@ span
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prop-name
|
||||||
|
{
|
||||||
|
display: inline-block;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
.prop-type
|
.prop-type
|
||||||
{
|
{
|
||||||
color: #55a;
|
color: #55a;
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ table
|
|||||||
|
|
||||||
&:first-of-type
|
&:first-of-type
|
||||||
{
|
{
|
||||||
width: 100px;
|
width: 124px;
|
||||||
padding: 0;
|
padding: 0 0 0 2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,6 +138,14 @@ table
|
|||||||
@include text_code(#888);
|
@include text_code(#888);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.parameter__deprecated
|
||||||
|
{
|
||||||
|
font-size: 12px;
|
||||||
|
font-style: italic;
|
||||||
|
|
||||||
|
@include text_code(#f00);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.table-container
|
.table-container
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user