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/12/11 10:07:00 UTC

[GitHub] [apisix] membphis opened a new issue #3022: feat: support to export the JSON schema of APISIX via `CLI`

membphis opened a new issue #3022:
URL: https://github.com/apache/apisix/issues/3022


   discuss mail:
   https://lists.apache.org/thread.html/rb1c19fe9b6e51ede3b5aead122e2bcd4de6249f42b971eabfb8a79ac%40%3Cdev.apisix.apache.org%3E
   
   Because the dashboard project requires schema verification for plug-ins,
   upstreams, etc., and the definition of the schema is written in the Lua
   code of Apache APISIX. Therefore, we need a tool to generate a JSON schema
   file based on the Lua code of Apache APISIX so that it can be used by the
   Go and front-end code of the dashboard project.
   
   If the developer want to sync the JSON schema, he/she should follow this step:
   
   1. export JSON schema file: call `apisix export-jsonschema`, we will get the file `schema.json`
   2. copy the file `schema.json` from apisix to the dashboard folder
   3. start the dashboard
   
   those steps are much safer. and the dashboard does not need any update.


----------------------------------------------------------------
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



[GitHub] [apisix] spacewander commented on issue #3022: feat: support to export the JSON schema of APISIX via `CLI`

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3022:
URL: https://github.com/apache/apisix/issues/3022#issuecomment-744111790


   We can't load the plugin schema without loading `ngx.*` stuff. What about doing this in control API (https://github.com/apache/apisix/issues/2798)? 


----------------------------------------------------------------
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



[GitHub] [apisix] tokers commented on issue #3022: feat: support to export the JSON schema of APISIX via `CLI`

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #3022:
URL: https://github.com/apache/apisix/issues/3022#issuecomment-744115550


   > We can't load the plugin schema without loading `ngx.*` stuff. What about doing this in control API (#2798)?
   
   Agree, otherwise the code base of CLI has to be refactored.


----------------------------------------------------------------
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



[GitHub] [apisix] membphis closed issue #3022: feat: support to export the JSON schema of APISIX via `CLI`

Posted by GitBox <gi...@apache.org>.
membphis closed issue #3022:
URL: https://github.com/apache/apisix/issues/3022


   


----------------------------------------------------------------
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



[GitHub] [apisix] tzssangglass commented on issue #3022: feat: support to export the JSON schema of APISIX via `CLI`

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #3022:
URL: https://github.com/apache/apisix/issues/3022#issuecomment-744040229


   when APISIX is not running, can export the JSON schema?


----------------------------------------------------------------
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



[GitHub] [apisix] nic-chen commented on issue #3022: feat: support to export the JSON schema of APISIX via `CLI`

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #3022:
URL: https://github.com/apache/apisix/issues/3022#issuecomment-748807842


   @spacewander, here is an exported data example:
   
   ```json
   {
       "main": {
           "consumer": {
               "additionalProperties": false,
               "properties": {
                   ...
               },
               "required": ["username"],
               "type": "object"            
           },
           "global_rule": {
               ...
           },
           ...
       },
       "plugins": {
           "authz-keycloak": {
               "consumer_schema": {},
               "metadata_schema": {},
               "priority": 0,
               "schema": {},
               "type":{},
               "version": ""
           },
           ...
       }
   }
   ```
   
   I will use it to continue working on the Dashboard first. 
   
   If there is any change, please let me know, thanks!
   
   
   
   


----------------------------------------------------------------
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



[GitHub] [apisix] juzhiyuan commented on issue #3022: feat: support to export the JSON schema of APISIX via `CLI`

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #3022:
URL: https://github.com/apache/apisix/issues/3022#issuecomment-743975115


   This tip should be clearly described in Apache APISIX's Documentation, too.


----------------------------------------------------------------
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