Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Sunny_yiyi
Swagger Ui
提交
9a66acf3
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,发现更多精彩内容 >>
提交
9a66acf3
编写于
11月 06, 2017
作者:
G
Greg Thompson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
operation extensions display
上级
44c422eb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
58 addition
and
1 deletion
+58
-1
src/core/components/operation-extension-row.jsx
src/core/components/operation-extension-row.jsx
+15
-0
src/core/components/operation-extensions.jsx
src/core/components/operation-extensions.jsx
+35
-0
src/core/components/operation.jsx
src/core/components/operation.jsx
+8
-1
未找到文件。
src/core/components/operation-extension-row.jsx
0 → 100644
浏览文件 @
9a66acf3
import
React
from
"
react
"
import
PropTypes
from
"
prop-types
"
export
const
OperationExtRow
=
({
xKey
,
xVal
})
=>
{
return
(<
tr
>
<
td
>
{
xKey
}
</
td
>
<
td
>
{
String
(
xVal
)
}
</
td
>
</
tr
>)
}
OperationExtRow
.
propTypes
=
{
xKey
:
PropTypes
.
string
,
xVal
:
PropTypes
.
any
}
export
default
OperationExtRow
src/core/components/operation-extensions.jsx
0 → 100644
浏览文件 @
9a66acf3
import
React
from
"
react
"
import
PropTypes
from
"
prop-types
"
export
const
OperationExt
=
({
extensions
,
getComponent
})
=>
{
let
OperationExtRow
=
getComponent
(
"
OperationExtRow
"
)
return
(
<
div
className
=
"opblock-section"
>
<
div
className
=
"opblock-section-header"
>
<
h4
>
Extensions
</
h4
>
</
div
>
<
div
className
=
"table-container"
>
<
table
>
<
thead
>
<
tr
>
<
td
className
=
"col col_header"
>
Field
</
td
>
<
td
className
=
"col col_header"
>
Value
</
td
>
</
tr
>
</
thead
>
<
tbody
>
{
extensions
.
entrySeq
().
map
(([
k
,
v
])
=>
<
OperationExtRow
key
=
{
`
${
k
}
-
${
v
}
`
}
xKey
=
{
k
}
xVal
=
{
v
}
/>)
}
</
tbody
>
</
table
>
</
div
>
</
div
>
)
}
OperationExt
.
propTypes
=
{
extensions
:
PropTypes
.
object
.
isRequired
,
getComponent
:
PropTypes
.
func
.
isRequired
}
export
default
OperationExt
src/core/components/operation.jsx
浏览文件 @
9a66acf3
...
...
@@ -2,7 +2,7 @@ import React, { PureComponent } from "react"
import
PropTypes
from
"
prop-types
"
import
{
getList
}
from
"
core/utils
"
import
*
as
CustomPropTypes
from
"
core/proptypes
"
import
{
sanitizeUrl
}
from
"
core/utils
"
import
{
getExtensions
,
sanitizeUrl
}
from
"
core/utils
"
//import "less/opblock"
...
...
@@ -126,6 +126,7 @@ export default class Operation extends PureComponent {
let
summary
=
operation
.
get
(
"
summary
"
)
let
description
=
operation
.
get
(
"
description
"
)
let
deprecated
=
operation
.
get
(
"
deprecated
"
)
let
extensions
=
getExtensions
(
operation
)
let
externalDocs
=
operation
.
get
(
"
externalDocs
"
)
let
responses
=
operation
.
get
(
"
responses
"
)
let
security
=
operation
.
get
(
"
security
"
)
||
specSelectors
.
security
()
...
...
@@ -144,6 +145,7 @@ export default class Operation extends PureComponent {
const
Collapse
=
getComponent
(
"
Collapse
"
)
const
Markdown
=
getComponent
(
"
Markdown
"
)
const
Schemes
=
getComponent
(
"
schemes
"
)
const
OperationExt
=
getComponent
(
"
OperationExt
"
)
const
{
deepLinking
}
=
getConfigs
()
...
...
@@ -211,6 +213,7 @@ export default class Operation extends PureComponent {
</
div
>
</
div
>
:
null
}
<
Parameters
parameters
=
{
parameters
}
operation
=
{
operation
}
...
...
@@ -277,6 +280,10 @@ export default class Operation extends PureComponent {
displayRequestDuration
=
{
displayRequestDuration
}
fn
=
{
fn
}
/>
}
{
!
extensions
.
size
?
null
:
<
OperationExt
extensions
=
{
extensions
}
getComponent
=
{
getComponent
}
/>
}
</
div
>
</
Collapse
>
</
div
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录