扩展选择参数中使用的 Json 架构没有添加和删除按钮,但相同的架构在 Json 编辑器中显示按钮

问题描述

我正在尝试通过以下代码使用扩展选择参数插件中的“JSON Parameter Config Groovy Script”选项。当在“https://www.jeremydorn.com/json-editor”上测试 JSON 模式时,我能够看到项目的添加删除按钮,但在 Jenkins 中测试时看到相同的 JSON 模式,我没有得到按钮。请帮我解决这个问题。

JSON 架构

 import net.sf.json.JSONObject
def jsoneditorOptions = JSONObject.fromObject(/{
                disable_edit_json: true,disable_properties: true,no_additional_properties: true,disable_collapse: true,disable_array_add: true,disable_array_delete: true,disable_array_reorder: true,theme: "bootstrap3",iconlib:"fontawesome5","keep_oneof_values": true,"object_layout": "normal","template": "default","show_errors": "interaction","prompt_before_delete": true,schema: {
          "type": "object","title": "System Test","properties": {
            "HttpProcessor": {
              "type": "array","format": "table","title": "HttpProcessor","uniqueItems": true,"items": {
                "type": "object","title": "Add API","required":["type","TPS"],"properties": {
                  "type": {
                    "type": "string","enum": [
                      "CreateAndissue","Redeem","Reload","CancelRedeem","CancelCreateAndissue"
                    ],"default": "CreateAndissue"
                  },"TPS": {
                    "type": "string"
                  }
                }
              },"default": [{
                "type": "CreateAndissue","TPS": "1"
              }]
            }
          }
        }
        }/);

Json-Editor 输出

Able to see Add API Button

詹金斯输出

Not Able to see Add API button

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...