{
  "openapi": "3.0.0",
  "info": {
    "title": "n8n 公共 API",
    "version": "1.1.1"
  },
  "components": {
    "schemas": {
      "credentialTypePolicyAttachmentsPublicDto.generated": {
        "type": "object",
        "properties": {
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "policyId": {
                  "type": "string"
                },
                "rules": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "allow",
                          "deny",
                          "delegate"
                        ]
                      },
                      "selector": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "name"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "kind",
                              "value"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "package"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "kind",
                              "value"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "extends"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "kind",
                              "value"
                            ],
                            "description": "匹配指定的凭据类型及继承它的所有类型"
                          }
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "id",
                      "action",
                      "selector"
                    ]
                  }
                },
                "priority": {
                  "type": "integer"
                },
                "isFloor": {
                  "type": "boolean"
                }
              },
              "required": [
                "policyId",
                "rules",
                "priority",
                "isFloor"
              ]
            }
          },
          "version": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true
          }
        },
        "required": [
          "attachments",
          "version"
        ]
      }
    }
  }
}
