summaryrefslogtreecommitdiff
path: root/spec/contracts/contracts/project/merge_request/show/mergerequest#show-merge_request_diffs_metadata_endpoint.json
blob: c59a3d55f43dc3c2d493374376e2bd48871a7c1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
{
  "consumer": {
    "name": "MergeRequest#show"
  },
  "provider": {
    "name": "Merge Request Diffs Metadata Endpoint"
  },
  "interactions": [
    {
      "description": "a request for diffs metadata",
      "providerState": "a merge request exists",
      "request": {
        "method": "GET",
        "path": "/gitlab-org/gitlab-qa/-/merge_requests/1/diffs_metadata.json",
        "headers": {
          "Accept": "*/*"
        }
      },
      "response": {
        "status": 200,
        "headers": {
          "Content-Type": "application/json; charset=utf-8"
        },
        "body": {
          "real_size": "1",
          "size": 1,
          "branch_name": "testing-branch-1",
          "source_branch_exists": true,
          "target_branch_name": "master",
          "merge_request_diff": {
            "created_at": "2022-02-17T11:47:08.804Z",
            "commits_count": 1,
            "latest": true,
            "short_commit_sha": "aee1ffec",
            "base_version_path": "/gitlab-qa-bot/contract-testing/-/merge_requests/1/diffs?diff_id=10581773",
            "head_version_path": "/gitlab-qa-bot/contract-testing/-/merge_requests/1/diffs?diff_head=true",
            "version_path": "/gitlab-qa-bot/contract-testing/-/merge_requests/1/diffs?diff_id=10581773",
            "compare_path": "/gitlab-qa-bot/contract-testing/-/merge_requests/1/diffs?diff_id=10581773&start_sha=aee1ffec2299c0cfb17c8821e931339b73a3759f"
          },
          "latest_diff": true,
          "latest_version_path": "/gitlab-qa-bot/contract-testing/-/merge_requests/1/diffs",
          "added_lines": 1,
          "removed_lines": 1,
          "render_overflow_warning": false,
          "email_patch_path": "/gitlab-qa-bot/contract-testing/-/merge_requests/1.patch",
          "plain_diff_path": "/gitlab-qa-bot/contract-testing/-/merge_requests/1.diff",
          "merge_request_diffs": [
            {
              "commits_count": 1,
              "latest": true,
              "short_commit_sha": "aee1ffec",
              "base_version_path": "/gitlab-qa-bot/contract-testing/-/merge_requests/1/diffs?diff_id=10581773",
              "head_version_path": "/gitlab-qa-bot/contract-testing/-/merge_requests/1/diffs?diff_head=true",
              "version_path": "/gitlab-qa-bot/contract-testing/-/merge_requests/1/diffs?diff_id=10581773",
              "compare_path": "/gitlab-qa-bot/contract-testing/-/merge_requests/1/diffs?diff_id=10581773&start_sha=aee1ffec2299c0cfb17c8821e931339b73a3759f"
            }
          ],
          "definition_path_prefix": "/gitlab-qa-bot/contract-testing/-/blob/aee1ffec2299c0cfb17c8821e931339b73a3759f",
          "diff_files": [
            {
              "added_lines": 1,
              "removed_lines": 1,
              "new_path": "Gemfile",
              "old_path": "Gemfile",
              "new_file": false,
              "deleted_file": false,
              "submodule": false,
              "file_identifier_hash": "67d82b8716a5b6c52c7abf0b2cd99c7594ed3587",
              "file_hash": "de3150c01c3a946a6168173c4116741379fe3579"
            }
          ],
          "has_conflicts": false,
          "can_merge": false,
          "project_path": "gitlab-qa-bot/contract-testing",
          "project_name": "contract-testing"
        },
        "matchingRules": {
          "$.body.real_size": {
            "match": "type"
          },
          "$.body.size": {
            "match": "type"
          },
          "$.body.branch_name": {
            "match": "type"
          },
          "$.body.source_branch_exists": {
            "match": "type"
          },
          "$.body.target_branch_name": {
            "match": "type"
          },
          "$.body.merge_request_diff.created_at": {
            "match": "regex",
            "regex": "^\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d(:?[0-5]\\d)?|Z)$"
          },
          "$.body.merge_request_diff.commits_count": {
            "match": "type"
          },
          "$.body.merge_request_diff.latest": {
            "match": "type"
          },
          "$.body.merge_request_diff.short_commit_sha": {
            "match": "type"
          },
          "$.body.merge_request_diff.base_version_path": {
            "match": "type"
          },
          "$.body.merge_request_diff.head_version_path": {
            "match": "type"
          },
          "$.body.merge_request_diff.version_path": {
            "match": "type"
          },
          "$.body.merge_request_diff.compare_path": {
            "match": "type"
          },
          "$.body.latest_diff": {
            "match": "type"
          },
          "$.body.latest_version_path": {
            "match": "type"
          },
          "$.body.added_lines": {
            "match": "type"
          },
          "$.body.removed_lines": {
            "match": "type"
          },
          "$.body.render_overflow_warning": {
            "match": "type"
          },
          "$.body.email_patch_path": {
            "match": "type"
          },
          "$.body.plain_diff_path": {
            "match": "type"
          },
          "$.body.merge_request_diffs": {
            "min": 1
          },
          "$.body.merge_request_diffs[*].*": {
            "match": "type"
          },
          "$.body.merge_request_diffs[*].commits_count": {
            "match": "type"
          },
          "$.body.merge_request_diffs[*].latest": {
            "match": "type"
          },
          "$.body.merge_request_diffs[*].short_commit_sha": {
            "match": "type"
          },
          "$.body.merge_request_diffs[*].base_version_path": {
            "match": "type"
          },
          "$.body.merge_request_diffs[*].head_version_path": {
            "match": "type"
          },
          "$.body.merge_request_diffs[*].version_path": {
            "match": "type"
          },
          "$.body.merge_request_diffs[*].compare_path": {
            "match": "type"
          },
          "$.body.definition_path_prefix": {
            "match": "type"
          },
          "$.body.diff_files": {
            "min": 1
          },
          "$.body.diff_files[*].*": {
            "match": "type"
          },
          "$.body.diff_files[*].added_lines": {
            "match": "type"
          },
          "$.body.diff_files[*].removed_lines": {
            "match": "type"
          },
          "$.body.diff_files[*].new_path": {
            "match": "type"
          },
          "$.body.diff_files[*].old_path": {
            "match": "type"
          },
          "$.body.diff_files[*].new_file": {
            "match": "type"
          },
          "$.body.diff_files[*].deleted_file": {
            "match": "type"
          },
          "$.body.diff_files[*].submodule": {
            "match": "type"
          },
          "$.body.diff_files[*].file_identifier_hash": {
            "match": "type"
          },
          "$.body.diff_files[*].file_hash": {
            "match": "type"
          },
          "$.body.has_conflicts": {
            "match": "type"
          },
          "$.body.can_merge": {
            "match": "type"
          },
          "$.body.project_path": {
            "match": "type"
          },
          "$.body.project_name": {
            "match": "type"
          }
        }
      }
    }
  ],
  "metadata": {
    "pactSpecification": {
      "version": "2.0.0"
    }
  }
}