Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Sunny_yiyi
Swagger Ui
提交
fe60544f
S
Swagger Ui
项目概览
Sunny_yiyi
/
Swagger Ui
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Swagger Ui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fe60544f
编写于
6月 26, 2017
作者:
O
Owen Conti
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:swagger-api/swagger-ui into ft/3135-request-duration
上级
7978318c
96673d13
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
78 addition
and
88 deletion
+78
-88
dist/swagger-ui-bundle.js
dist/swagger-ui-bundle.js
+40
-40
dist/swagger-ui-bundle.js.map
dist/swagger-ui-bundle.js.map
+1
-1
dist/swagger-ui-standalone-preset.js
dist/swagger-ui-standalone-preset.js
+6
-7
dist/swagger-ui-standalone-preset.js.map
dist/swagger-ui-standalone-preset.js.map
+1
-1
dist/swagger-ui.js
dist/swagger-ui.js
+9
-9
dist/swagger-ui.js.map
dist/swagger-ui.js.map
+1
-1
src/core/components/operation.jsx
src/core/components/operation.jsx
+2
-7
src/core/components/param-body.jsx
src/core/components/param-body.jsx
+2
-7
src/core/components/response.jsx
src/core/components/response.jsx
+9
-7
src/core/json-schema-components.js
src/core/json-schema-components.js
+2
-7
src/core/plugins/samples/fn.js
src/core/plugins/samples/fn.js
+5
-1
未找到文件。
dist/swagger-ui-bundle.js
浏览文件 @
fe60544f
此差异已折叠。
点击以展开。
dist/swagger-ui-bundle.js.map
浏览文件 @
fe60544f
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AAitFA;;;;;;AAoIA;AAy2FA;AA8iCA;AA6lJA;AA8vIA;AA8iFA;AAi4GA;AA8jFA;AAu0FA;AA89CA;AAy9CA;AA+qCA;AAs0EA;;;;;AAw/CA;AA8zJA;;;;;;;;;;;;;;AAyoFA;AA+lIA;AA4oJA;AAqvHA;AAsvGA;AA2iEA;AAy5DA;AA65DA;AAAA;;;;;;AAk8GA;AA2nHA;;;;;AAkoDA;AAgsFA;AA6kDA;AAq3CA;AA4wFA;AAk3CA;AA8iFA;;;;;;;;;AA2qEA;AA2zIA;AAu7FA;AAmrFA;AAwiHA","sourceRoot":""}
\ No newline at end of file
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA+4CA;;;;;;AAoIA;AAy2FA;AA8iCA;AA6lJA;AA81IA;AAwuGA;AA01FA;AAkjFA;AAs3FA;AAi+CA;AA29CA;AAmtCA;AAuyEA;;;;;AAwiDA;AA8zJA;;;;;;;;;;;;;;AAyoFA;AA+lIA;AA4oJA;AAqvHA;AA8nGA;AA+iEA;AAw3DA;AA4nDA;AAknBA;;;;;;AAg1FA;AAggGA;;;;;AA23CA;AAgsFA;AA6kDA;AA01CA;AA8yFA;AA61CA;AA0jFA;;;;;;;;;AA6pEA;AA2zIA;AAu7FA;AAmrFA;AAq/EA","sourceRoot":""}
\ No newline at end of file
dist/swagger-ui-standalone-preset.js
浏览文件 @
fe60544f
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
dist/swagger-ui-standalone-preset.js.map
浏览文件 @
fe60544f
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;AA+uFA;;;;;AAyOA;AAo7GA;AAw0FA;;;;;;AAmZA;AAivFA;AAu+CA;AAo+CA;AAirCA;AAuyEA","sourceRoot":""}
\ No newline at end of file
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;;;;;AA+tEA;AAo7GA;AAw0FA;;;;;;AAmZA;AAivFA;AAu+CA;AAo+CA;AAirCA;AAuyEA","sourceRoot":""}
\ No newline at end of file
dist/swagger-ui.js
浏览文件 @
fe60544f
此差异已折叠。
点击以展开。
dist/swagger-ui.js.map
浏览文件 @
fe60544f
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;AAylFA;;;;;;AAg5CA;AA2pHA;AA6qIA;AAi+FA;AAyvDA;AAmzCA;AA+xCA","sourceRoot":""}
\ No newline at end of file
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;AA+nEA;;;;;;AAmgBA;AA2pHA;AA0pIA;AA09FA;AA0+CA;AAs0CA;AAgvCA","sourceRoot":""}
\ No newline at end of file
src/core/components/operation.jsx
浏览文件 @
fe60544f
import
React
,
{
PropTypes
}
from
"
react
"
import
shallowCompare
from
"
react-addons-shallow-compare
"
import
React
,
{
PureComponent
,
PropTypes
}
from
"
react
"
import
{
getList
}
from
"
core/utils
"
import
*
as
CustomPropTypes
from
"
core/proptypes
"
//import "less/opblock"
export
default
class
Operation
extends
React
.
Component
{
export
default
class
Operation
extends
Pure
Component
{
static
propTypes
=
{
path
:
PropTypes
.
string
.
isRequired
,
method
:
PropTypes
.
string
.
isRequired
,
...
...
@@ -70,10 +69,6 @@ export default class Operation extends React.Component {
}
}
shouldComponentUpdate
(
props
,
state
)
{
return
shallowCompare
(
this
,
props
,
state
)
}
toggleShown
=
()
=>
{
let
{
layoutActions
,
isShownKey
}
=
this
.
props
layoutActions
.
show
(
isShownKey
,
!
this
.
isShown
())
...
...
src/core/components/param-body.jsx
浏览文件 @
fe60544f
import
React
,
{
Component
,
PropTypes
}
from
"
react
"
import
shallowCompare
from
"
react-addons-shallow-compare
"
import
React
,
{
PureComponent
,
PropTypes
}
from
"
react
"
import
{
fromJS
,
List
}
from
"
immutable
"
import
{
getSampleSchema
}
from
"
core/utils
"
const
NOOP
=
Function
.
prototype
export
default
class
ParamBody
extends
Component
{
export
default
class
ParamBody
extends
Pure
Component
{
static
propTypes
=
{
param
:
PropTypes
.
object
,
...
...
@@ -41,10 +40,6 @@ export default class ParamBody extends Component {
this
.
updateValues
.
call
(
this
,
this
.
props
)
}
shouldComponentUpdate
(
props
,
state
)
{
return
shallowCompare
(
this
,
props
,
state
)
}
componentWillReceiveProps
(
nextProps
)
{
this
.
updateValues
.
call
(
this
,
nextProps
)
}
...
...
src/core/components/response.jsx
浏览文件 @
fe60544f
...
...
@@ -5,14 +5,16 @@ import { getSampleSchema } from "core/utils"
const
getExampleComponent
=
(
sampleResponse
,
examples
,
HighlightCode
)
=>
{
if
(
examples
&&
examples
.
size
)
{
return
examples
.
entrySeq
().
map
(
([
key
,
example
])
=>
{
let
exampleValue
try
{
exampleValue
=
example
&&
example
.
toJS
?
example
.
toJS
()
:
example
exampleValue
=
JSON
.
stringify
(
exampleValue
,
null
,
2
)
}
catch
(
e
)
{
exampleValue
=
String
(
example
)
let
exampleValue
=
example
if
(
example
.
toJS
)
{
try
{
exampleValue
=
JSON
.
stringify
(
example
.
toJS
(),
null
,
2
)
}
catch
(
e
)
{
exampleValue
=
String
(
example
)
}
}
return
(<
div
key
=
{
key
}
>
<
h5
>
{
key
}
</
h5
>
<
HighlightCode
className
=
"example"
value
=
{
exampleValue
}
/>
...
...
src/core/json-schema-components.js
浏览文件 @
fe60544f
import
React
,
{
PropTypes
,
Component
}
from
"
react
"
import
shallowCompare
from
"
react-addons-shallow-compare
"
import
React
,
{
PropTypes
,
PureComponent
,
Component
}
from
"
react
"
import
{
List
,
fromJS
}
from
"
immutable
"
//import "less/json-schema-form"
...
...
@@ -74,7 +73,7 @@ export class JsonSchema_string extends Component {
}
}
export
class
JsonSchema_array
extends
Component
{
export
class
JsonSchema_array
extends
Pure
Component
{
static
propTypes
=
JsonSchemaPropShape
static
defaultProps
=
JsonSchemaDefaultProps
...
...
@@ -89,10 +88,6 @@ export class JsonSchema_array extends Component {
this
.
setState
({
value
:
props
.
value
})
}
shouldComponentUpdate
(
props
,
state
)
{
return
shallowCompare
(
this
,
props
,
state
)
}
onChange
=
()
=>
this
.
props
.
onChange
(
this
.
state
.
value
)
onItemChange
=
(
itemVal
,
i
)
=>
{
...
...
src/core/plugins/samples/fn.js
浏览文件 @
fe60544f
...
...
@@ -9,7 +9,7 @@ const primitives = {
"
number
"
:
()
=>
0
,
"
number_float
"
:
()
=>
0.0
,
"
integer
"
:
()
=>
0
,
"
boolean
"
:
(
)
=>
true
"
boolean
"
:
(
schema
)
=>
typeof
schema
.
default
===
"
boolean
"
?
schema
.
default
:
true
}
const
primitive
=
(
schema
)
=>
{
...
...
@@ -74,6 +74,10 @@ export const sampleFromSchema = (schema, config={}) => {
return
normalizeArray
(
schema
[
"
enum
"
])[
0
]
}
if
(
type
===
"
file
"
)
{
return
}
return
primitive
(
schema
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录