debian-mirror-gitlab/spec/fixtures/api/schemas/conflicts.json

205 lines
4.1 KiB
JSON
Raw Normal View History

2016-11-03 12:29:30 +05:30
{
"type": "object",
"required": [
"commit_message",
"commit_sha",
"source_branch",
"target_branch",
"files"
],
"properties": {
2023-03-04 22:38:38 +05:30
"commit_message": {
"type": "string"
},
"commit_sha": {
"type": "string",
"pattern": "^[0-9a-f]{40}$"
},
"source_branch": {
"type": "string"
},
"target_branch": {
"type": "string"
},
2016-11-03 12:29:30 +05:30
"files": {
"type": "array",
"items": {
"oneOf": [
2023-03-04 22:38:38 +05:30
{
"$ref": "#/definitions/conflict-text-with-sections"
},
{
"$ref": "#/definitions/conflict-text-for-editor"
}
2016-11-03 12:29:30 +05:30
]
}
}
},
"definitions": {
"conflict-base": {
"type": "object",
"required": [
"old_path",
"new_path",
"blob_icon",
"blob_path"
],
"properties": {
2023-03-04 22:38:38 +05:30
"old_path": {
"type": "string"
},
"new_path": {
"type": "string"
},
"blob_icon": {
"type": "string"
},
"blob_path": {
"type": "string"
}
2016-11-03 12:29:30 +05:30
}
},
"conflict-text-for-editor": {
"allOf": [
2023-03-04 22:38:38 +05:30
{
"$ref": "#/definitions/conflict-base"
},
2016-11-03 12:29:30 +05:30
{
"type": "object",
"required": [
"type",
"content_path"
],
"properties": {
2023-03-04 22:38:38 +05:30
"type": {
"type": "string",
"enum": [
"text",
"text-editor"
]
},
"content_path": {
"type": "string"
}
2016-11-03 12:29:30 +05:30
}
}
]
},
"conflict-text-with-sections": {
"allOf": [
2023-03-04 22:38:38 +05:30
{
"$ref": "#/definitions/conflict-base"
},
2016-11-03 12:29:30 +05:30
{
"type": "object",
"required": [
"type",
"content_path",
"sections"
],
"properties": {
2023-03-04 22:38:38 +05:30
"type": {
"type": "string",
"enum": [
"text"
]
},
"content_path": {
"type": "string"
},
2016-11-03 12:29:30 +05:30
"sections": {
"type": "array",
"items": {
"oneOf": [
2023-03-04 22:38:38 +05:30
{
"$ref": "#/definitions/section-context"
},
{
"$ref": "#/definitions/section-conflict"
}
2016-11-03 12:29:30 +05:30
]
}
}
}
}
]
},
"section-base": {
"type": "object",
"required": [
"conflict",
"lines"
],
"properties": {
2023-03-04 22:38:38 +05:30
"conflict": {
"type": "boolean"
},
2016-11-03 12:29:30 +05:30
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"old_line",
"new_line",
"text",
"rich_text"
],
"properties": {
2023-03-04 22:38:38 +05:30
"type": {
"type": "string"
},
"old_line": {
"type": "string"
},
"new_line": {
"type": "string"
},
"text": {
"type": "string"
},
"rich_text": {
"type": "string"
}
2016-11-03 12:29:30 +05:30
}
}
}
}
},
"section-context": {
"allOf": [
2023-03-04 22:38:38 +05:30
{
"$ref": "#/definitions/section-base"
},
2016-11-03 12:29:30 +05:30
{
"type": "object",
"properties": {
2023-03-04 22:38:38 +05:30
"conflict": {
"type": "boolean"
}
2016-11-03 12:29:30 +05:30
}
}
]
},
"section-conflict": {
"allOf": [
2023-03-04 22:38:38 +05:30
{
"$ref": "#/definitions/section-base"
},
2016-11-03 12:29:30 +05:30
{
"type": "object",
2023-03-04 22:38:38 +05:30
"required": [
"id"
],
2016-11-03 12:29:30 +05:30
"properties": {
2023-03-04 22:38:38 +05:30
"conflict": {
"type": "boolean"
},
"id": {
"type": "string"
}
2016-11-03 12:29:30 +05:30
}
}
]
}
}
2023-03-04 22:38:38 +05:30
}