Product-apim: Impossible de modifier la définition de l'API

Créé le 25 févr. 2020  ·  3Commentaires  ·  Source: wso2/product-apim

J'ai été créé un exemple d'API.
Lorsque je modifie le nom de la ressource du menu au menu123 et que je clique pour mettre à jour le contenu
Screenshot from 2020-02-25 15-10-05

Dans Over View, je peux voir le nom de la ressource changer pour menu123
Screenshot from 2020-02-25 15-17-58

Ensuite, je clique uniquement sur enregistrer dans les configurations d'exécution, cela revient au menu
avant
Screenshot from 2020-02-25 15-26-14
après
Screenshot from 2020-02-25 15-27-05

3.1.0 PrioritHigh React-UI TypQuestion

Tous les 3 commentaires

aidez moi ~~

@Thangthanh , comme solution de contournement, vous pouvez suivre les étapes mentionnées ci-dessous :

  1. Mettre à jour la définition de swagger
  2. Redéployer l'API à partir de l'onglet Cycle de vie

Après le redéploiement, si vous avez apporté des modifications aux configurations d'exécution, cela n'affectera pas les modifications apportées aux ressources.

@Thangthanh ,

Merci d'avoir signalé ce problème,

@vithu30

Voici une solution potentielle à ce problème,

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}
Cette page vous a été utile?
0 / 5 - 0 notes