Product-apim: 无法编辑 API 定义

创建于 2020-02-25  ·  3评论  ·  资料来源: wso2/product-apim

我创建了一个示例 API。
当我将资源名称从菜单修改为 menu123 并单击以更新内容时
Screenshot from 2020-02-25 15-10-05

在 Over View 中,我可以看到资源名称更改为 menu123
Screenshot from 2020-02-25 15-17-58

然后,我只在运行时配置中单击保存,它变回菜单
之前
Screenshot from 2020-02-25 15-26-14

Screenshot from 2020-02-25 15-27-05

3.1.0 PrioritHigh React-UI TypQuestion

所有3条评论

帮帮我~~

@Thangthanh ,作为一种解决方法,您可以按照下面提到的步骤操作:

  1. 更新招摇定义
  2. 从生命周期选项卡重新部署 API

重新部署后,如果您对运行时配置进行了任何更改,则不会影响对资源所做的更改。

@Thangthanh

感谢您报告此问题,

@vithu30

这是此问题的潜在解决方案,

diff --git a/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Details/APIDefinition/APIDefinition.jsx b/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Details/APIDefinition/APIDefinition.jsx
index b14a6305a9..fafd494bba 100644
--- a/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Details/APIDefinition/APIDefinition.jsx
+++ b/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Details/APIDefinition/APIDefinition.jsx
@@ -317,7 +317,7 @@ class APIDefinition extends React.Component {
      * <strong i="11">@param</strong> {string} toFormat The format it can be converted to.
      * */
     updateSwaggerDefinition(swaggerContent, specFormat, toFormat) {
-        const { api, intl } = this.props;
+        const { api, intl, updateAPI } = this.props;
         let parsedContent = {};
         if (this.hasJsonStructure(swaggerContent)) {
             parsedContent = JSON.parse(swaggerContent);
@@ -351,6 +351,7 @@ class APIDefinition extends React.Component {
                         this.setState({ swagger: swaggerContent });
                     }
                 }
+                updateAPI();
             })
             .catch((err) => {
                 console.log(err);
diff --git a/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Details/index.jsx b/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Details/index.jsx
index e18f4b1de4..5764c2e1aa 100644
--- a/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Details/index.jsx
+++ b/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Details/index.jsx
@@ -651,7 +651,7 @@ class Details extends Component {
                                 <Route path={Details.subPaths.OVERVIEW} component={() => <Overview api={api} />} />
                                 <Route
                                     path={Details.subPaths.API_DEFINITION}
-                                    component={() => <APIDefinition api={api} />}
+                                    component={() => <APIDefinition api={api} updateAPI={this.updateAPI} />}
                                 />
                                 <Route
                                     path={Details.subPaths.WSDL}
此页面是否有帮助?
0 / 5 - 0 等级