Product-apim: Kann API-Definition nicht bearbeiten

Erstellt am 25. Feb. 2020  ·  3Kommentare  ·  Quelle: wso2/product-apim

Mir wurde eine Beispiel-API erstellt.
Wenn ich den Namen der Ressource von menu in menu123 ändere und klicke, um den Inhalt zu aktualisieren
Screenshot from 2020-02-25 15-10-05

In der Übersicht kann ich sehen, wie sich der Name der Ressource in menu123 ändert
Screenshot from 2020-02-25 15-17-58

Dann klicke ich nur bei Runtime Configurations auf Speichern, es wechselt zurück zum Menü
vor
Screenshot from 2020-02-25 15-26-14
nach
Screenshot from 2020-02-25 15-27-05

3.1.0 PrioritHigh React-UI TypQuestion

Alle 3 Kommentare

hilf mir ~~

@Thangthanh , als Workaround können Sie die folgenden Schritte

  1. Prahlerei-Definition aktualisieren
  2. API über den Tab "Lebenszyklus" erneut bereitstellen

Wenn Sie nach der erneuten Bereitstellung Änderungen an den Laufzeitkonfigurationen vorgenommen haben, wirkt sich dies nicht auf die Änderungen an den Ressourcen aus.

@Thangthanh ,

Vielen Dank, dass Sie dieses Problem gemeldet haben,

@vithu30

Hier ist eine mögliche Lösung für dieses Problem,

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}
War diese Seite hilfreich?
0 / 5 - 0 Bewertungen