Commit 35d27fc1 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs-cleanup-example-json' into 'master'

Fix malformed JSON examples in API docs

See merge request gitlab-org/gitlab!46716
parents eeb5f423 8c8b0085
......@@ -316,7 +316,6 @@ Example response:
{
"id": "8b090c1b79a14f2bd9e8a738f717824ff53aebad",
"short_id": "8b090c1b",
"title": "Feature added",
"author_name": "Example User",
"author_email": "user@example.com",
"authored_date": "2016-12-12T20:10:39.000+01:00",
......
......@@ -266,7 +266,7 @@ Example of response
"status": "success",
"updated_at": "2016-08-11T07:43:52.143Z",
"web_url": "http://gitlab.dev/root/project/pipelines/5"
}
},
"runner": null
}
}
......
......@@ -270,7 +270,7 @@ GET /projects/:id/snippets/:snippet_id/discussions
"system": false,
"noteable_id": 3,
"noteable_type": "Snippet",
"noteable_id": null
"noteable_iid": null
},
{
"id": 1129,
......@@ -290,7 +290,7 @@ GET /projects/:id/snippets/:snippet_id/discussions
"system": false,
"noteable_id": 3,
"noteable_type": "Snippet",
"noteable_id": null,
"noteable_iid": null,
"resolvable": false
}
]
......@@ -317,7 +317,7 @@ GET /projects/:id/snippets/:snippet_id/discussions
"system": false,
"noteable_id": 3,
"noteable_type": "Snippet",
"noteable_id": null,
"noteable_iid": null,
"resolvable": false
}
]
......@@ -476,7 +476,7 @@ GET /groups/:id/epics/:epic_id/discussions
"system": false,
"noteable_id": 3,
"noteable_type": "Epic",
"noteable_id": null,
"noteable_iid": null,
"resolvable": false
},
{
......@@ -497,7 +497,7 @@ GET /groups/:id/epics/:epic_id/discussions
"system": false,
"noteable_id": 3,
"noteable_type": "Epic",
"noteable_id": null,
"noteable_iid": null,
"resolvable": false
}
]
......@@ -524,7 +524,7 @@ GET /groups/:id/epics/:epic_id/discussions
"system": false,
"noteable_id": 3,
"noteable_type": "Epic",
"noteable_id": null,
"noteable_iid": null,
"resolvable": false
}
]
......@@ -757,7 +757,7 @@ Diff comments also contain position:
"notes": [
{
"id": 1128,
"type": DiffNote,
"type": "DiffNote",
"body": "diff comment",
"attachment": null,
"author": {
......@@ -787,12 +787,12 @@ Diff comments also contain position:
"line_range": {
"start": {
"line_code": "588440f66559714280628a4f9799f0c4eb880a4a_10_10",
"type": "new",
"type": "new"
},
"end": {
"line_code": "588440f66559714280628a4f9799f0c4eb880a4a_11_11",
"type": "old"
},
}
}
},
"resolved": false,
......@@ -1089,7 +1089,7 @@ Diff comments contain also position:
"notes": [
{
"id": 1128,
"type": DiffNote,
"type": "DiffNote",
"body": "diff comment",
"attachment": null,
"author": {
......
......@@ -97,7 +97,7 @@ Example response:
"id": 6,
"iid": 38,
"group_id": 1,
"parent_id": 5
"parent_id": 5,
"title": "Accusamus iste et ullam ratione voluptatem omnis debitis dolor est.",
"description": "Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.",
"author": {
......
......@@ -301,7 +301,7 @@ Example response:
```json
[
{
"id": 8
"id": 8,
"title":null,
"project_id":1,
"action_name":"opened",
......
......@@ -126,7 +126,7 @@ Example response:
"iid": 1,
"project_id": 1,
"created_at": "2020-02-04T08:13:10.507Z",
"updated_at": "2020-02-04T08:13:10.507Z",
"updated_at": "2020-02-04T08:13:10.507Z"
}
```
......
......@@ -70,7 +70,7 @@ Example response:
"version": "new_version_flag",
"created_at":"2019-11-04T08:13:10.507Z",
"updated_at":"2019-11-04T08:13:10.507Z",
"scopes":[]
"scopes":[],
"strategies": [
{
"id": 2,
......
......@@ -362,9 +362,6 @@ Example response:
"wikis_checksum_mismatch_count": 1,
"repositories_retrying_verification_count": 1,
"wikis_retrying_verification_count": 3,
"repositories_checked_count": 7,
"repositories_checked_failed_count": 2,
"repositories_checked_in_percentage": "17.07%",
"last_event_id": 23,
"last_event_timestamp": 1509681166,
"cursor_last_event_id": null,
......
......@@ -192,6 +192,6 @@ Example response:
"link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}",
"image_url": "https://shields.io/my/badge",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master",
"rendered_image_url": "https://shields.io/my/badge",
"rendered_image_url": "https://shields.io/my/badge"
}
```
......@@ -101,7 +101,7 @@ GET /groups?statistics=true
"lfs_objects_size" : 123,
"job_artifacts_size" : 57,
"packages_size": 0,
"snippets_size" : 50,
"snippets_size" : 50
}
}
]
......
......@@ -84,7 +84,7 @@ Example response:
},
"provider_gcp": null,
"management_project": null
}
},
{
"id": 11,
"name": "cluster-3",
......
......@@ -117,7 +117,7 @@ Example response:
"due_date": null,
"web_url": "http://example.com/example/example/issues/11",
"confidential": false,
"weight": null,
"weight": null
},
"target_issue" : {
"id" : 84,
......@@ -147,7 +147,7 @@ Example response:
"due_date": null,
"web_url": "http://example.com/example/example/issues/14",
"confidential": false,
"weight": null,
"weight": null
},
"link_type": "relates_to"
}
......@@ -198,7 +198,7 @@ DELETE /projects/:id/issues/:issue_iid/links/:issue_link_id
"due_date": null,
"web_url": "http://example.com/example/example/issues/11",
"confidential": false,
"weight": null,
"weight": null
},
"target_issue" : {
"id" : 84,
......@@ -228,7 +228,7 @@ DELETE /projects/:id/issues/:issue_iid/links/:issue_link_id
"due_date": null,
"web_url": "http://example.com/example/example/issues/14",
"confidential": false,
"weight": null,
"weight": null
},
"link_type": "relates_to"
}
......
......@@ -591,83 +591,79 @@ Example response:
```json
{
"id" : 1,
"milestone" : {
"due_date" : null,
"project_id" : 4,
"state" : "closed",
"description" : "Rerum est voluptatem provident consequuntur molestias similique ipsum dolor.",
"iid" : 3,
"id" : 11,
"title" : "v3.0",
"created_at" : "2016-01-04T15:31:39.788Z",
"updated_at" : "2016-01-04T15:31:39.788Z",
"closed_at" : "2016-01-05T15:31:46.176Z"
},
"author" : {
"state" : "active",
"web_url" : "https://gitlab.example.com/root",
"avatar_url" : null,
"username" : "root",
"id" : 1,
"name" : "Administrator"
},
"description" : "Omnis vero earum sunt corporis dolor et placeat.",
"state" : "closed",
"iid" : 1,
"assignees" : [{
"avatar_url" : null,
"web_url" : "https://gitlab.example.com/lennie",
"state" : "active",
"username" : "lennie",
"id" : 9,
"name" : "Dr. Luella Kovacek"
}],
"assignee" : {
"avatar_url" : null,
"web_url" : "https://gitlab.example.com/lennie",
"state" : "active",
"username" : "lennie",
"id" : 9,
"name" : "Dr. Luella Kovacek"
},
"labels" : [],
"upvotes": 4,
"downvotes": 0,
"merge_requests_count": 0,
"title" : "Ut commodi ullam eos dolores perferendis nihil sunt.",
"updated_at" : "2016-01-04T15:31:46.176Z",
"created_at" : "2016-01-04T15:31:46.176Z",
"closed_at" : null,
"closed_by" : null,
"subscribed": false,
"user_notes_count": 1,
"due_date": null,
"web_url": "http://example.com/my-group/my-project/issues/1",
"references": {
"short": "#1",
"relative": "#1",
"full": "my-group/my-project#1"
},
"time_stats": {
"time_estimate": 0,
"total_time_spent": 0,
"human_time_estimate": null,
"human_total_time_spent": null
},
"confidential": false,
"discussion_locked": false,
"_links": {
"self": "http://example.com/api/v4/projects/1/issues/2",
"notes": "http://example.com/api/v4/projects/1/issues/2/notes",
"award_emoji": "http://example.com/api/v4/projects/1/issues/2/award_emoji",
"project": "http://example.com/api/v4/projects/1"
},
"task_completion_status":{
"count":0,
"completed_count":0
},
"weight": null,
"id": 1,
"milestone": {
"due_date": null,
"project_id": 4,
"state": "closed",
"description": "Rerum est voluptatem provident consequuntur molestias similique ipsum dolor.",
"iid": 3,
"id": 11,
"title": "v3.0",
"created_at": "2016-01-04T15:31:39.788Z",
"updated_at": "2016-01-04T15:31:39.788Z",
"closed_at": "2016-01-05T15:31:46.176Z"
},
"author": {
"state": "active",
"web_url": "https://gitlab.example.com/root",
"avatar_url": null,
"username": "root",
"id": 1,
"name": "Administrator"
},
"description": "Omnis vero earum sunt corporis dolor et placeat.",
"state": "closed",
"iid": 1,
"assignees": [
{
"avatar_url": null,
"web_url": "https://gitlab.example.com/lennie",
"state": "active",
"username": "lennie",
"id": 9,
"name": "Dr. Luella Kovacek"
}
],
"assignee": {
"avatar_url": null,
"web_url": "https://gitlab.example.com/lennie",
"state": "active",
"username": "lennie",
"id": 9,
"name": "Dr. Luella Kovacek"
},
"labels": [],
"upvotes": 4,
"downvotes": 0,
"merge_requests_count": 0,
"title": "Ut commodi ullam eos dolores perferendis nihil sunt.",
"updated_at": "2016-01-04T15:31:46.176Z",
"created_at": "2016-01-04T15:31:46.176Z",
"closed_at": null,
"closed_by": null,
"subscribed": false,
"user_notes_count": 1,
"due_date": null,
"web_url": "http://example.com/my-group/my-project/issues/1",
"references": {
"short": "#1",
"relative": "#1",
"full": "my-group/my-project#1"
},
"time_stats": {
"time_estimate": 0,
"total_time_spent": 0,
"human_time_estimate": null,
"human_total_time_spent": null
},
"confidential": false,
"discussion_locked": false,
"task_completion_status": {
"count": 0,
"completed_count": 0
},
"weight": null,
"has_tasks": false,
"_links": {
"self": "http://gitlab.example:3000/api/v4/projects/1/issues/1",
......@@ -675,12 +671,6 @@ Example response:
"award_emoji": "http://gitlab.example:3000/api/v4/projects/1/issues/1/award_emoji",
"project": "http://gitlab.example:3000/api/v4/projects/1"
},
"references": {
"short": "#1",
"relative": "#1",
"full": "gitlab-org/gitlab-test#1"
},
"subscribed": true,
"moved_to_id": null,
"service_desk_reply_to": "service.desk@gitlab.com",
"epic_iid": null,
......
......@@ -68,7 +68,6 @@ Example of response
"status": "pending"
},
"ref": "master",
"artifacts": [],
"runner": null,
"stage": "test",
"status": "failed",
......
......@@ -31,7 +31,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
"title": "Sample key 25",
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt1256k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
"created_at": "2015-09-03T07:24:44.627Z",
"expires_at": "2020-05-05T00:00:00.000Z"
"expires_at": "2020-05-05T00:00:00.000Z",
"user": {
"name": "John Smith",
"username": "john_smith",
......@@ -59,7 +59,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
"identities": [],
"can_create_group": true,
"can_create_project": true,
"two_factor_enabled": false
"two_factor_enabled": false,
"external": false,
"private_profile": null
}
......@@ -100,7 +100,7 @@ Example response:
"title": "Sample key 1",
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt1016k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
"created_at": "2019-11-14T15:11:13.222Z",
"expires_at": "2020-05-05T00:00:00.000Z"
"expires_at": "2020-05-05T00:00:00.000Z",
"user": {
"id": 1,
"name": "Administrator",
......
......@@ -80,7 +80,7 @@ GET /licenses
"Name": "Doe John"
},
"add_ons": {
"GitLab_FileLocks": 1,
"GitLab_FileLocks": 1
}
}
]
......
......@@ -136,7 +136,7 @@ Example response:
"avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
"web_url": "http://192.168.1.8:3000/root",
"expires_at": "2012-10-22T14:13:35Z",
"access_level": 30
"access_level": 30,
"email": "john@example.com",
"group_saml_identity": {
"extern_uid":"ABC-1234567890",
......
......@@ -664,7 +664,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/approvals
"web_url": "http://localhost:3000/root"
}
}
],
]
}
```
......@@ -1109,7 +1109,7 @@ does not match, the response code is `409`.
"web_url": "http://localhost:3000/ryley"
}
}
],
]
}
```
......
......@@ -2319,7 +2319,7 @@ Example response:
"short": "!1",
"relative": "!1",
"full": "my-group/my-project!1"
},
}
},
"target_url": "https://gitlab.example.com/gitlab-org/gitlab-ci/merge_requests/7",
"body": "Et voluptas laudantium minus nihil recusandae ut accusamus earum aut non.",
......
......@@ -176,7 +176,9 @@ Example responses:
{
"level": "watch"
}
```
```json
{
"level": "custom",
"events": {
......
......@@ -370,8 +370,8 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form "value=u
```json
{
"key": "NEW_VARIABLE",
"value": "updated value"
"variable_type": "env_var",
"value": "updated value",
"variable_type": "env_var"
}
```
......
......@@ -60,7 +60,7 @@ Example of response
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
"web_url": "https://example.com/foo/bar/pipelines/47",
"created_at": "2016-08-11T11:28:34.085Z",
"updated_at": "2016-08-11T11:32:35.169Z",
"updated_at": "2016-08-11T11:32:35.169Z"
},
{
"id": 48,
......@@ -70,7 +70,7 @@ Example of response
"sha": "eb94b618fb5865b26e80fdd8ae531b7a63ad851a",
"web_url": "https://example.com/foo/bar/pipelines/48",
"created_at": "2016-08-12T10:06:04.561Z",
"updated_at": "2016-08-12T10:09:56.223Z",
"updated_at": "2016-08-12T10:09:56.223Z"
}
]
```
......
......@@ -59,7 +59,7 @@ Example response:
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master",
"rendered_image_url": "https://shields.io/my/badge",
"kind": "group"
},
}
]
```
......@@ -202,6 +202,6 @@ Example response:
"link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}",
"image_url": "https://shields.io/my/badge",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master",
"rendered_image_url": "https://shields.io/my/badge",
"rendered_image_url": "https://shields.io/my/badge"
}
```
......@@ -104,7 +104,7 @@ an email notifying the user to download the file, uploading the exported file to
"export_status": "finished",
"_links": {
"api_url": "https://gitlab.example.com/api/v4/projects/1/export/download",
"web_url": "https://gitlab.example.com/gitlab-org/gitlab-test/download_export",
"web_url": "https://gitlab.example.com/gitlab-org/gitlab-test/download_export"
}
}
```
......
......@@ -68,6 +68,7 @@ Example response:
"path": "project1",
"path_with_namespace": "namespace1/project1",
"created_at": "2020-05-07T04:27:17.016Z"
}
}
]
```
......@@ -111,6 +112,7 @@ Example response:
"path": "project1",
"path_with_namespace": "namespace1/project1",
"created_at": "2020-05-07T04:27:17.016Z"
}
}
]
```
......@@ -150,6 +152,7 @@ Example response:
"path": "project1",
"path_with_namespace": "namespace1/project1",
"created_at": "2020-05-07T04:27:17.016Z"
}
}
```
......@@ -189,6 +192,7 @@ Example response:
"path": "project1",
"path_with_namespace": "namespace1/project1",
"created_at": "2020-05-07T04:27:17.016Z"
}
}
```
......@@ -237,6 +241,7 @@ Example response:
"path": "project1",
"path_with_namespace": "namespace1/project1",
"created_at": "2020-05-07T04:27:17.016Z"
}
}
```
......
......@@ -114,7 +114,7 @@ curl --request POST "https://gitlab.com/api/v4/projects/:id/snippets" \
"files": [
{
"file_path": "example.txt",
"content" : "source code \n with multiple lines\n",
"content" : "source code \n with multiple lines\n"
}
]
}
......
......@@ -94,7 +94,7 @@ When `simple=true` or the user is unauthenticated this returns something like:
"last_activity_at": "2013-09-30T13:46:02Z",
"forks_count": 0,
"avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png",
"star_count": 0,
"star_count": 0
},
{
"id": 6,
......@@ -189,7 +189,7 @@ When the user is authenticated and `simple` is not set this returns something li
"labels": "http://example.com/api/v4/projects/1/labels",
"events": "http://example.com/api/v4/projects/1/events",
"members": "http://example.com/api/v4/projects/1/members"
},
}
},
{
"id": 6,
......@@ -902,7 +902,6 @@ GET /projects/:id
"merge_method": "merge",
"auto_devops_enabled": true,
"auto_devops_deploy_strategy": "continuous",
"repository_storage": "default",
"approvals_before_merge": 0,
"mirror": false,
"mirror_user_id": 45,
......@@ -986,7 +985,7 @@ If the project is a fork, and you provide a valid token to authenticate, the
"name": "MIT License",
"nickname": null,
"html_url": "http://choosealicense.com/licenses/mit/",
"source_url": "https://opensource.org/licenses/MIT",
"source_url": "https://opensource.org/licenses/MIT"
},
"star_count":3812,
"forks_count":3561,
......@@ -1661,26 +1660,26 @@ Example responses:
[
{
"starred_since": "2019-01-28T14:47:30.642Z",
"user":
{
"user": {
"id": 1,
"username": "jane_smith",
"name": "Jane Smith",
"state": "active",
"avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
"web_url": "http://localhost:3000/jane_smith"
}
}
},
{
"starred_since": "2018-01-02T11:40:26.570Z",
"user":
{
"id": 2,
"username": "janine_smith",
"name": "Janine Smith",
"state": "blocked",
"avatar_url": "http://gravatar.com/../e32131cd8.jpeg",
"web_url": "http://localhost:3000/janine_smith"
}
"user": {
"id": 2,
"username": "janine_smith",
"name": "Janine Smith",
"state": "blocked",
"avatar_url": "http://gravatar.com/../e32131cd8.jpeg",
"web_url": "http://localhost:3000/janine_smith"
}
}
]
```
......
......@@ -144,9 +144,9 @@ Example response:
},
"evidences":[
{
sha: "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d",
filepath: "https://gitlab.example.com/root/awesome-app/-/releases/v0.2/evidence.json",
collected_at: "2019-01-03T01:56:19.539Z"
"sha": "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d",
"filepath": "https://gitlab.example.com/root/awesome-app/-/releases/v0.2/evidence.json",
"collected_at": "2019-01-03T01:56:19.539Z"
}
]
},
......@@ -208,9 +208,9 @@ Example response:
},
"evidences":[
{
sha: "c3ffedec13af470e760d6cdfb08790f71cf52c6cde4d",
filepath: "https://gitlab.example.com/root/awesome-app/-/releases/v0.1/evidence.json",
collected_at: "2019-01-03T01:55:18.203Z"
"sha": "c3ffedec13af470e760d6cdfb08790f71cf52c6cde4d",
"filepath": "https://gitlab.example.com/root/awesome-app/-/releases/v0.1/evidence.json",
"collected_at": "2019-01-03T01:55:18.203Z"
}
]
}
......@@ -340,9 +340,9 @@ Example response:
},
"evidences":[
{
sha: "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d",
filepath: "https://gitlab.example.com/root/awesome-app/-/releases/v0.1/evidence.json",
collected_at: "2019-07-16T14:00:12.256Z"
"sha": "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d",
"filepath": "https://gitlab.example.com/root/awesome-app/-/releases/v0.1/evidence.json",
"collected_at": "2019-07-16T14:00:12.256Z"
}
]
}
......@@ -482,7 +482,7 @@ Example response:
}
],
"evidence_file_path":"https://gitlab.example.com/root/awesome-app/-/releases/v0.3/evidence.json"
},
}
}
```
......@@ -625,7 +625,7 @@ Example response:
],
"evidence_file_path":"https://gitlab.example.com/root/awesome-app/-/releases/v0.1/evidence.json"
},
}
}
```
......@@ -709,7 +709,7 @@ Example response:
],
"evidence_file_path":"https://gitlab.example.com/root/awesome-app/-/releases/v0.1/evidence.json"
},
}
}
```
......
......@@ -126,7 +126,7 @@ Example response:
"ip_address": "127.0.0.1",
"is_shared": true,
"name": null,
"online": false
"online": false,
"status": "offline"
},
{
......@@ -136,7 +136,7 @@ Example response:
"ip_address": "127.0.0.1",
"is_shared": false,
"name": null,
"online": true
"online": true,
"status": "paused"
},
{
......@@ -428,7 +428,7 @@ Example response:
"ip_address": "127.0.0.1",
"is_shared": true,
"name": null,
"online": true
"online": true,
"status": "paused"
}
]
......
......@@ -42,7 +42,7 @@ Example response:
"wiki_page_events": true,
"job_events": true,
"comment_on_event_enabled": true
}
},
{
"id": 76,
"title": "Alerts endpoint",
......
......@@ -1762,6 +1762,6 @@ Example response:
"source_name": "Group three",
"source_type": "Namespace",
"access_level": "20"
},
}
]
```
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment