View | Details | Raw Unified | Return to bug 22785
Collapse All | Expand All

(-)a/api/v1/swagger/definitions/import_record_match.json (-21 lines)
Lines 1-21 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "import_record_id": {
5
      "type": "integer",
6
      "description": "Internal import record identifier"
7
    },
8
    "candidate_match_id": {
9
      "type": "integer",
10
      "description": "Internal import record match candidate identifier"
11
    },
12
    "chosen": {
13
      "type": "boolean",
14
      "description": "Whether match has been chosen for overlay"
15
    },
16
    "score": {
17
      "type": "integer",
18
      "description": "Ranking value for this match calculated by the matching rules"
19
    }
20
  }
21
}
(-)a/api/v1/swagger/parameters/import_record_match.json (-16 lines)
Lines 1-16 Link Here
1
{
2
  "import_record_id_pp": {
3
    "name": "import_record_id",
4
    "in": "path",
5
    "description": "Internal import_record identifier",
6
    "required": true,
7
    "type": "integer"
8
  },
9
  "candidate_match_id_pp": {
10
    "name": "candidate_match_id",
11
    "in": "path",
12
    "description": "Internal import_record_match_candidate identifier",
13
    "required": true,
14
    "type": "integer"
15
  }
16
}
(-)a/api/v1/swagger/parameters/import_record_match.yaml (-13 lines)
Lines 1-13 Link Here
1
---
2
import_record_id_pp:
3
  name: import_record_id
4
  in: path
5
  description: Internal import_record identifier
6
  required: true
7
  type: integer
8
candidate_match_id_pp:
9
  name: candidate_match_id
10
  in: path
11
  description: Internal import_record_match_candidate identifier
12
  required: true
13
  type: integer
(-)a/api/v1/swagger/paths/import_record_matches.json (-145 lines)
Lines 1-144 Link Here
1
{
2
  "/import/{import_batch_id}/records/{import_record_id}/matches/chosen": {
3
    "put": {
4
      "x-mojo-to": "ImportRecordMatches#set_chosen",
5
      "operationId": "setChosen",
6
      "tags": ["import_record_matches"],
7
      "parameters": [{
8
          "name": "import_batch_id",
9
          "in": "path",
10
          "required": true,
11
          "description": "An import_batch ID",
12
          "type": "integer"
13
      }, {
14
          "name": "import_record_id",
15
          "in": "path",
16
          "required": true,
17
          "description": "An import_record ID",
18
          "type": "integer"
19
      }, {
20
          "name": "body",
21
          "in": "body",
22
          "description": "A JSON object containing fields to modify",
23
          "required": true,
24
          "schema": {
25
            "type": "object",
26
            "properties": {
27
              "candidate_match_id": {
28
                "description": "Candudate match to choose",
29
                "type": "integer"
30
              }
31
            }
32
          }
33
        }
34
      ],
35
      "consumes": ["application/json"],
36
      "produces": ["application/json"],
37
      "responses": {
38
        "200": {
39
          "description": "Match updated"
40
        },
41
        "400": {
42
          "description": "Missing or wrong parameters",
43
          "schema": {
44
            "$ref": "../definitions.json#/error"
45
          }
46
        },
47
        "401": {
48
          "description": "Authentication required",
49
          "schema": {
50
            "$ref": "../definitions.json#/error"
51
          }
52
        },
53
        "403": {
54
          "description": "Match management not allowed",
55
          "schema": {
56
            "$ref": "../definitions.json#/error"
57
          }
58
        },
59
        "404": {
60
          "description": "Import record match not found",
61
          "schema": {
62
            "$ref": "../definitions.json#/error"
63
          }
64
        },
65
        "500": {
66
          "description": "Internal server error",
67
          "schema": {
68
            "$ref": "../definitions.json#/error"
69
          }
70
        },
71
        "503": {
72
          "description": "Under maintenance",
73
          "schema": {
74
            "$ref": "../definitions.json#/error"
75
          }
76
        }
77
      },
78
      "x-koha-authorization": {
79
        "permissions": {
80
          "tools": "manage_staged_marc"
81
        }
82
      }
83
    },
84
    "delete": {
85
      "x-mojo-to": "ImportRecordMatches#unset_chosen",
86
      "operationId": "unsetChosen",
87
      "tags": ["import_record_matches"],
88
      "parameters": [{
89
          "name": "import_batch_id",
90
          "in": "path",
91
          "required": true,
92
          "description": "An import_batch ID",
93
          "type": "integer"
94
      }, {
95
          "name": "import_record_id",
96
          "in": "path",
97
          "required": true,
98
          "description": "An import_record ID",
99
          "type": "integer"
100
      }],
101
      "produces": ["application/json"],
102
      "responses": {
103
        "204": {
104
          "description": "Matches unchosen"
105
        },
106
        "401": {
107
          "description": "Authentication required",
108
          "schema": {
109
            "$ref": "../definitions.json#/error"
110
          }
111
        },
112
        "403": {
113
          "description": "Match management not allowed",
114
          "schema": {
115
            "$ref": "../definitions.json#/error"
116
          }
117
        },
118
        "404": {
119
          "description": "Import record matches not found",
120
          "schema": {
121
            "$ref": "../definitions.json#/error"
122
          }
123
        },
124
        "500": {
125
          "description": "Internal server error",
126
          "schema": {
127
            "$ref": "../definitions.json#/error"
128
          }
129
        },
130
        "503": {
131
          "description": "Under maintenance",
132
          "schema": {
133
            "$ref": "../definitions.json#/error"
134
          }
135
        }
136
      },
137
      "x-koha-authorization": {
138
        "permissions": {
139
          "tools": "manage_staged_marc"
140
        }
141
      }
142
    }
143
  }
144
}
145
- 

Return to bug 22785