You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/19 04:33:06 UTC

[GitHub] [apisix-dashboard] liuxiran commented on issue #825: [Proposal]: Import and Export route

liuxiran commented on issue #825:
URL: https://github.com/apache/apisix-dashboard/issues/825#issuecomment-730122856


   > OpenAPI is a description document used to provide quick reading and testing. The route in APISIX is also used to manage API, there are still some differences. For example, we need to consider how to convert the plugin logic in route.
   
   Yep, OpenApi is mainly  defines some of the contents of the api itself, including: `name`, `description`, `service-side address`, `method`, `path`, `request params`, `response params`, `authentication and authorization` , etc, example configurations can refer to [1].
   
   In addition to the basic content of the api mentioned above, `Route` defined in APISIX also contains powerful extension properties, these need to be done by configuring different plugins. The configuration of these plugins are not currently supported by OpenApi except for Authentication plugins. 
   
   
   > We'd better limit the import / export responsibility boundary and provide a more detailed transformation example.
   
   The limit I think would be as follows:
   
   1.  Import and export only support the basic information of the api: `name`, `description`, `method`, `path`, `request parameters`, `response parameters`, `authentication`, those are supported by OpenApi, and also the  parameters required by APISIX.
   
   1. `Upstream` info, which OpenApi cannot describe very specificly;  and other plugins  info, which cannot supported by OpenApi, I think we would use the `service module` to achieve this part of functions. As a kind of draft, we can supplement the OpenApi with something like  `serviceId field` corresponding to APISIX's service_id[2], before user import their apis, they needs to create a service in APISIX, which can include `upstream` and necessary `plugins`, and add the service_id to their OpenApi configurations.
   
   
   cc @gxthrj @nic-chen @LiteSun 
   
   Referenceļ¼š
   [1]: https://editor.swagger.io/?_ga=2.10529719.2089761848.1605756499-667259753.1599635344
   [2]: https://github.com/apache/apisix/blob/master/doc/zh-cn/admin-api.md#route
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org