feature: sync json schema from APISIX and check schema when create or update resource#551
Conversation
…cause json schema check fail.
| @@ -0,0 +1,400 @@ | |||
| -- | |||
There was a problem hiding this comment.
Not sure if this file has the license issue, cc @moonming
There was a problem hiding this comment.
@nic-chen where is this file come from?
We need a list of those copied files and source addresses in order to check license
There was a problem hiding this comment.
@moonming
It's from https://github.com/rxi/json.lua
I think we could resolve license issues together later.
membphis
left a comment
There was a problem hiding this comment.
Do we have added test cases for file build-tools/schema-sync.lua ?
| unzip master.zip | ||
| sudo mv ./apisix-master/apisix/* ./build-tools/apisix/ | ||
| rm -rf ./apisix-master | ||
| cd ./build-tools/ && lua schema-sync.lua > ../conf/schema.json |
There was a problem hiding this comment.
I think we need to check if the conf/schema.json is the correct
There was a problem hiding this comment.
if scheme.json is not correct, manager api will not be able to run:
https://github.com/apache/apisix-dashboard/pull/551/files#diff-662a29145b19ca440fb3bca6c8605c50R45-R48
juzhiyuan
left a comment
There was a problem hiding this comment.
LGTM, please remember to resolve License issues.
|
I see that there are still some problems in the code, but they do not affect the main function, we can fix it later. |
* feat: refactor some codes and append store core * refference droplet and write a API demo * fmt project * feat: add validator for generic store; add demo error * feat: upgrade droplet * chore: add structures (#484) * add upstream struct * fix structures * feat: append stock check for generic store * feat: add consumer CURD refactoring (#486) * feat: add consumer CURD refactoring * remove debug * remove useless slashes * feat: add SSL refactoring (#488) Co-authored-by: Vinci Xu <[email protected]> * feat: add Service and Upstream refactoring (#497) * feat: add Service and Upstream refactoring * fix add license * feat: add store hub and flake id (#534) * feat: add store hub and flake id * feat: add store interface to easy est * fix: add test cases for refactored apis and fix bugs (#528) * test: delete mysql version test cases. * fix: add ssl test cases and bug fix * fix: list api should return an empty array not a null for client * test: consumer test cases * fix: code style * test: init etcd in github action * fix: skip checking generated file's license * feat: add store hub and flake id (#534) * feat: add store hub and flake id * feat: add store interface to easy est * fix CI failed Co-authored-by: Vinci Xu <[email protected]> * feat: refactor apis for existing check and other apis (#535) * fix code style * fix code style * feat support query * feat: support query * change: `like` to `equal` * fix api status * feat: upstream existing check * feat: refactor api for upstream names * fix: license * test: add unit test cases * fix: update bug * test: add test cases for route * fix: unified respond format * test: remove test bug * feat: ssl existing check * fix bug: auto generate id * fix: improve consumer * fix: remove key and keys in ssl respond * fix: when list is empty, should respond an empty array * fix code style * feat: plugin orchestration * fix delete bug * fix bug * fix: keep the same request params and respond with the old format * fix: append sort for list and using sync.Map instead of map * feature: sync json schema from APISIX and check schema when create or update resource (#551) * feat: json schema check * fix: don't need to define struct for each resource, because that may cause json schema check fail. * test: add handler test cases * test: complete consumer test cases * test: add test cases for schema check * fix code style and license * feat: add schema check for plugins * test: add ssl handler test cases * test: add test cases for upstream and service * test: add test cases for route * test: add note for route create * test: update CI * fix: remove useless file * test: fix CI * fix: ci fail * test: fix lib `dag-to-lua`'s path in CI * fix: URI for route may be empty * fix: remove empty lines * fix: refactor validator of json schema * fix code style * fix cicd * chore: update docker file * fix: should check schema after id generated * fix code style * chore: page_number -> page * fix: schema sync script * fix: code style * feat: support search for resource list (#557) * feat: support search for resource list * fix ci * feature: refactor plugin api and auth api (#556) * feat: refactor plugin and healthy api * feat: refactor authentication api * fix: remove useless files * chore: update json schema * test: add login test * test: add test for plugin * fix: license * fix auth bug * fix route search by uri * feat: compatible with PUT method of `admin api` and nodes of upstream (#561) * feat: support labels * feat: compatible with PUT method of `admin api` * fix mock test fail * feat: upstream nodes format * test: add test case * fix code style * fix: update schema sync tool * feat: compatible with HTTP status of `admin api` (#563) * feat: compatible with HTTP status of `admin api` * test cases and improve * fix: check input.ID before using it * fix: remove CI branch * fix: remove useless dependences * add license for json.lua * fix license issue * remove * fix: remove viper that depend github.com/hashicorp/hcl * fix license issue * fix: skip license check temporarily for CI Co-authored-by: vincixu <[email protected]> Co-authored-by: ShiningRush <[email protected]> Co-authored-by: WenMing <[email protected]>
Please answer these questions before submitting a pull request
New feature or improvement
sync json schema from APISIX and check schema when create or update resource