xk-ai commented on issue #8636:
URL: https://github.com/apache/apisix/issues/8636#issuecomment-1727186975

   > 找到方法了,方法分享一下:
   > 
   > 1、按照文档开发插件 xxx.lua 2、将xxx.lua放到apisix容器的/usr/local/apisix/apisix/plugins/
   > 
   > ```
   > docker cp xxx.lua docker-id:/usr/local/apisix/apisix/plugins/
   > ```
   > 
   > 3、修改apisix_conf/config.yaml, 新增配置
   > 
   > ```
   > plugins:
   >   - xxx
   > ```
   > 
   > 4、重启apisix
   > 
   > ```
   > docker  restart docker-id
   > ```
   > 
   > 5、导出schema.json
   > 
   > ```
   > curl localhost:9092/v1/schema > schema.json
   > ```
   > 
   > 6、将schema.json放到apisix-dashboard的覆盖原配置
   > 
   > ```
   > docker cp schema.json docker-id:/usr/local/apisix-dashboard/conf/
   > ```
   > 
   > 7、重启 dashboard
   > 
   > ```
   > docker restart dashboard-id
   > ```
   > 
   > 之后就可以在dashboard后台新建或修改路由,选择自定义插件了
   
   您好,我按照你的步骤,从第五步的时候开始出现问题,curl localhost:9092/v1/schema > 
schema.json,导出的shcema只有我新增的插件,我把原路径下的schema手动添加自定义的插件,把对应shema的json放进去,然后etcd莫名其妙异常崩溃,过一段时间才能正常启动,数据被自动清空。在这我有点几点疑惑,希望能帮忙解答
   1.curl localhost:9092/v1/schema > schema.json  
这个导出的是谁的数据,是apisix的数据还是dashboard的数据。端口选择
   
2.我不更新dashboard的schema,直接加完插件后,调用http://xxxx"xx/apisix/admin/routes/88,对外api添加路由,报错"error_msg":
 "invalid configuration: allOf 1 failed: value should match only one schema, 
but matches none,可我数据都是对,是我没更新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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to