diff --git a/src/core/components/operation-extension-row.jsx b/src/core/components/operation-extension-row.jsx
new file mode 100644
index 0000000000000000000000000000000000000000..7c3a90dc3e3f8aa424b8046d1390d350d8f18788
--- /dev/null
+++ b/src/core/components/operation-extension-row.jsx
@@ -0,0 +1,15 @@
+import React from "react"
+import PropTypes from "prop-types"
+
+export const OperationExtRow = ({ xKey, xVal }) => {
+ return (
+ { xKey } |
+ { String(xVal) } |
+
)
+}
+OperationExtRow.propTypes = {
+ xKey: PropTypes.string,
+ xVal: PropTypes.any
+}
+
+export default OperationExtRow
diff --git a/src/core/components/operation-extensions.jsx b/src/core/components/operation-extensions.jsx
new file mode 100644
index 0000000000000000000000000000000000000000..256f7a52507ce14979998d660bec5626a7e7d8fa
--- /dev/null
+++ b/src/core/components/operation-extensions.jsx
@@ -0,0 +1,35 @@
+import React from "react"
+import PropTypes from "prop-types"
+
+export const OperationExt = ({ extensions, getComponent }) => {
+ let OperationExtRow = getComponent("OperationExtRow")
+ return (
+
+
+
Extensions
+
+
+
+
+
+
+ Field |
+ Value |
+
+
+
+ {
+ extensions.entrySeq().map(([k, v]) => )
+ }
+
+
+
+
+ )
+}
+OperationExt.propTypes = {
+ extensions: PropTypes.object.isRequired,
+ getComponent: PropTypes.func.isRequired
+}
+
+export default OperationExt
diff --git a/src/core/components/operation.jsx b/src/core/components/operation.jsx
index c3210ddf4435f925665b61d7d3223cc63910db95..c04fa0ae45e13c513375d928208558d0096f760b 100644
--- a/src/core/components/operation.jsx
+++ b/src/core/components/operation.jsx
@@ -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 {
: null
}
+
}
+
+ { !extensions.size ? null :
+
+ }