Product-apim: No se puede editar la definición de API

Creado en 25 feb. 2020  ·  3Comentarios  ·  Fuente: wso2/product-apim

Me crearon una API de muestra.
Cuando modifico el nombre del recurso del menú al menú 123 y hago clic para actualizar el contenido
Screenshot from 2020-02-25 15-10-05

En Vista general, puedo ver el nombre del recurso cambiar al menú 123
Screenshot from 2020-02-25 15-17-58

Luego, solo hago clic en Guardar en Configuraciones de tiempo de ejecución, vuelve al menú
antes
Screenshot from 2020-02-25 15-26-14
después
Screenshot from 2020-02-25 15-27-05

3.1.0 PrioritHigh React-UI TypQuestion

Todos 3 comentarios

ayúdame ~~

@Thangthanh , como solución alternativa, puede seguir los pasos que se mencionan a continuación:

  1. Actualizar la definición de arrogancia
  2. Volver a implementar la API desde la pestaña Ciclo de vida

Después de la redistribución, si realizó algún cambio en las configuraciones de tiempo de ejecución, no afectará los cambios realizados en los recursos.

@Thangthanh ,

Gracias por reportar este problema,

@ vithu30

Aquí hay una posible solución para este problema,

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}
¿Fue útil esta página
0 / 5 - 0 calificaciones