From 5753acfabc20b97f3ff8f9767382b960a4a9e95a Mon Sep 17 00:00:00 2001 From: Adam Niedzielski Date: Mon, 6 Mar 2017 12:49:52 +0100 Subject: Move schema definitions for our public API to a separate directory --- .../api/schemas/public_api/v4/user/login.json | 36 ++++++++++ .../api/schemas/public_api/v4/user/public.json | 77 ++++++++++++++++++++++ spec/fixtures/api/schemas/user/login.json | 36 ---------- spec/fixtures/api/schemas/user/public.json | 77 ---------------------- 4 files changed, 113 insertions(+), 113 deletions(-) create mode 100644 spec/fixtures/api/schemas/public_api/v4/user/login.json create mode 100644 spec/fixtures/api/schemas/public_api/v4/user/public.json delete mode 100644 spec/fixtures/api/schemas/user/login.json delete mode 100644 spec/fixtures/api/schemas/user/public.json (limited to 'spec/fixtures') diff --git a/spec/fixtures/api/schemas/public_api/v4/user/login.json b/spec/fixtures/api/schemas/public_api/v4/user/login.json new file mode 100644 index 00000000000..6181b3ccc86 --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/user/login.json @@ -0,0 +1,36 @@ +{ + "type": "object", + "required": [ + "id", + "username", + "email", + "name", + "state", + "avatar_url", + "web_url", + "created_at", + "is_admin", + "bio", + "location", + "skype", + "linkedin", + "twitter", + "website_url", + "organization", + "last_sign_in_at", + "confirmed_at", + "color_scheme_id", + "projects_limit", + "current_sign_in_at", + "identities", + "can_create_group", + "can_create_project", + "two_factor_enabled", + "external", + "private_token" + ], + "properties": { + "$ref": "full.json", + "private_token": { "type": "string" } + } +} diff --git a/spec/fixtures/api/schemas/public_api/v4/user/public.json b/spec/fixtures/api/schemas/public_api/v4/user/public.json new file mode 100644 index 00000000000..5587cfec61a --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/user/public.json @@ -0,0 +1,77 @@ +{ + "type": "object", + "required": [ + "id", + "username", + "email", + "name", + "state", + "avatar_url", + "web_url", + "created_at", + "is_admin", + "bio", + "location", + "skype", + "linkedin", + "twitter", + "website_url", + "organization", + "last_sign_in_at", + "confirmed_at", + "color_scheme_id", + "projects_limit", + "current_sign_in_at", + "identities", + "can_create_group", + "can_create_project", + "two_factor_enabled", + "external" + ], + "properties": { + "id": { "type": "integer" }, + "username": { "type": "string" }, + "email": { + "type": "string", + "pattern": "^[^@]+@[^@]+$" + }, + "name": { "type": "string" }, + "state": { + "type": "string", + "enum": ["active", "blocked"] + }, + "avatar_url": { "type": "string" }, + "web_url": { "type": "string" }, + "created_at": { "type": "date" }, + "is_admin": { "type": "boolean" }, + "bio": { "type": ["string", "null"] }, + "location": { "type": ["string", "null"] }, + "skype": { "type": "string" }, + "linkedin": { "type": "string" }, + "twitter": { "type": "string "}, + "website_url": { "type": "string" }, + "organization": { "type": ["string", "null"] }, + "last_sign_in_at": { "type": "date" }, + "confirmed_at": { "type": ["date", "null"] }, + "color_scheme_id": { "type": "integer" }, + "projects_limit": { "type": "integer" }, + "current_sign_in_at": { "type": "date" }, + "identities": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["github", "bitbucket", "google_oauth2"] + }, + "extern_uid": { "type": ["number", "string"] } + } + } + }, + "can_create_group": { "type": "boolean" }, + "can_create_project": { "type": "boolean" }, + "two_factor_enabled": { "type": "boolean" }, + "external": { "type": "boolean" } + } +} diff --git a/spec/fixtures/api/schemas/user/login.json b/spec/fixtures/api/schemas/user/login.json deleted file mode 100644 index 6181b3ccc86..00000000000 --- a/spec/fixtures/api/schemas/user/login.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "object", - "required": [ - "id", - "username", - "email", - "name", - "state", - "avatar_url", - "web_url", - "created_at", - "is_admin", - "bio", - "location", - "skype", - "linkedin", - "twitter", - "website_url", - "organization", - "last_sign_in_at", - "confirmed_at", - "color_scheme_id", - "projects_limit", - "current_sign_in_at", - "identities", - "can_create_group", - "can_create_project", - "two_factor_enabled", - "external", - "private_token" - ], - "properties": { - "$ref": "full.json", - "private_token": { "type": "string" } - } -} diff --git a/spec/fixtures/api/schemas/user/public.json b/spec/fixtures/api/schemas/user/public.json deleted file mode 100644 index 5587cfec61a..00000000000 --- a/spec/fixtures/api/schemas/user/public.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "type": "object", - "required": [ - "id", - "username", - "email", - "name", - "state", - "avatar_url", - "web_url", - "created_at", - "is_admin", - "bio", - "location", - "skype", - "linkedin", - "twitter", - "website_url", - "organization", - "last_sign_in_at", - "confirmed_at", - "color_scheme_id", - "projects_limit", - "current_sign_in_at", - "identities", - "can_create_group", - "can_create_project", - "two_factor_enabled", - "external" - ], - "properties": { - "id": { "type": "integer" }, - "username": { "type": "string" }, - "email": { - "type": "string", - "pattern": "^[^@]+@[^@]+$" - }, - "name": { "type": "string" }, - "state": { - "type": "string", - "enum": ["active", "blocked"] - }, - "avatar_url": { "type": "string" }, - "web_url": { "type": "string" }, - "created_at": { "type": "date" }, - "is_admin": { "type": "boolean" }, - "bio": { "type": ["string", "null"] }, - "location": { "type": ["string", "null"] }, - "skype": { "type": "string" }, - "linkedin": { "type": "string" }, - "twitter": { "type": "string "}, - "website_url": { "type": "string" }, - "organization": { "type": ["string", "null"] }, - "last_sign_in_at": { "type": "date" }, - "confirmed_at": { "type": ["date", "null"] }, - "color_scheme_id": { "type": "integer" }, - "projects_limit": { "type": "integer" }, - "current_sign_in_at": { "type": "date" }, - "identities": { - "type": "array", - "items": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "enum": ["github", "bitbucket", "google_oauth2"] - }, - "extern_uid": { "type": ["number", "string"] } - } - } - }, - "can_create_group": { "type": "boolean" }, - "can_create_project": { "type": "boolean" }, - "two_factor_enabled": { "type": "boolean" }, - "external": { "type": "boolean" } - } -} -- cgit v1.2.1 From c727d4328fa14c4e90eb47c04f045c0f54224018 Mon Sep 17 00:00:00 2001 From: Adam Niedzielski Date: Mon, 6 Mar 2017 12:48:10 +0100 Subject: Remove "subscribed" field from API responses returning list of issues or merge requests --- .../fixtures/api/schemas/public_api/v3/issues.json | 77 +++++++++++++++++++ .../api/schemas/public_api/v3/merge_requests.json | 89 ++++++++++++++++++++++ .../fixtures/api/schemas/public_api/v4/issues.json | 76 ++++++++++++++++++ .../api/schemas/public_api/v4/merge_requests.json | 88 +++++++++++++++++++++ 4 files changed, 330 insertions(+) create mode 100644 spec/fixtures/api/schemas/public_api/v3/issues.json create mode 100644 spec/fixtures/api/schemas/public_api/v3/merge_requests.json create mode 100644 spec/fixtures/api/schemas/public_api/v4/issues.json create mode 100644 spec/fixtures/api/schemas/public_api/v4/merge_requests.json (limited to 'spec/fixtures') diff --git a/spec/fixtures/api/schemas/public_api/v3/issues.json b/spec/fixtures/api/schemas/public_api/v3/issues.json new file mode 100644 index 00000000000..f2ee9c925ae --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v3/issues.json @@ -0,0 +1,77 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties" : { + "id": { "type": "integer" }, + "iid": { "type": "integer" }, + "project_id": { "type": "integer" }, + "title": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "state": { "type": "string" }, + "created_at": { "type": "date" }, + "updated_at": { "type": "date" }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "milestone": { + "type": "object", + "properties": { + "id": { "type": "integer" }, + "iid": { "type": "integer" }, + "project_id": { "type": "integer" }, + "title": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "state": { "type": "string" }, + "created_at": { "type": "date" }, + "updated_at": { "type": "date" }, + "due_date": { "type": "date" }, + "start_date": { "type": "date" } + }, + "additionalProperties": false + }, + "assignee": { + "type": ["object", "null"], + "properties": { + "name": { "type": "string" }, + "username": { "type": "string" }, + "id": { "type": "integer" }, + "state": { "type": "string" }, + "avatar_url": { "type": "uri" }, + "web_url": { "type": "uri" } + }, + "additionalProperties": false + }, + "author": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "username": { "type": "string" }, + "id": { "type": "integer" }, + "state": { "type": "string" }, + "avatar_url": { "type": "uri" }, + "web_url": { "type": "uri" } + }, + "additionalProperties": false + }, + "user_notes_count": { "type": "integer" }, + "upvotes": { "type": "integer" }, + "downvotes": { "type": "integer" }, + "due_date": { "type": ["date", "null"] }, + "confidential": { "type": "boolean" }, + "web_url": { "type": "uri" }, + "subscribed": { "type": ["boolean"] } + }, + "required": [ + "id", "iid", "project_id", "title", "description", + "state", "created_at", "updated_at", "labels", + "milestone", "assignee", "author", "user_notes_count", + "upvotes", "downvotes", "due_date", "confidential", + "web_url", "subscribed" + ], + "additionalProperties": false + } +} diff --git a/spec/fixtures/api/schemas/public_api/v3/merge_requests.json b/spec/fixtures/api/schemas/public_api/v3/merge_requests.json new file mode 100644 index 00000000000..01f9fbb2c89 --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v3/merge_requests.json @@ -0,0 +1,89 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties" : { + "id": { "type": "integer" }, + "iid": { "type": "integer" }, + "project_id": { "type": "integer" }, + "title": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "state": { "type": "string" }, + "created_at": { "type": "date" }, + "updated_at": { "type": "date" }, + "target_branch": { "type": "string" }, + "source_branch": { "type": "string" }, + "upvotes": { "type": "integer" }, + "downvotes": { "type": "integer" }, + "author": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "username": { "type": "string" }, + "id": { "type": "integer" }, + "state": { "type": "string" }, + "avatar_url": { "type": "uri" }, + "web_url": { "type": "uri" } + }, + "additionalProperties": false + }, + "assignee": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "username": { "type": "string" }, + "id": { "type": "integer" }, + "state": { "type": "string" }, + "avatar_url": { "type": "uri" }, + "web_url": { "type": "uri" } + }, + "additionalProperties": false + }, + "source_project_id": { "type": "integer" }, + "target_project_id": { "type": "integer" }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "work_in_progress": { "type": "boolean" }, + "milestone": { + "type": ["object", "null"], + "properties": { + "id": { "type": "integer" }, + "iid": { "type": "integer" }, + "project_id": { "type": "integer" }, + "title": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "state": { "type": "string" }, + "created_at": { "type": "date" }, + "updated_at": { "type": "date" }, + "due_date": { "type": "date" }, + "start_date": { "type": "date" } + }, + "additionalProperties": false + }, + "merge_when_build_succeeds": { "type": "boolean" }, + "merge_status": { "type": "string" }, + "sha": { "type": "string" }, + "merge_commit_sha": { "type": ["string", "null"] }, + "user_notes_count": { "type": "integer" }, + "should_remove_source_branch": { "type": ["boolean", "null"] }, + "force_remove_source_branch": { "type": ["boolean", "null"] }, + "web_url": { "type": "uri" }, + "subscribed": { "type": ["boolean"] } + }, + "required": [ + "id", "iid", "project_id", "title", "description", + "state", "created_at", "updated_at", "target_branch", + "source_branch", "upvotes", "downvotes", "author", + "assignee", "source_project_id", "target_project_id", + "labels", "work_in_progress", "milestone", "merge_when_build_succeeds", + "merge_status", "sha", "merge_commit_sha", "user_notes_count", + "should_remove_source_branch", "force_remove_source_branch", + "web_url", "subscribed" + ], + "additionalProperties": false + } +} diff --git a/spec/fixtures/api/schemas/public_api/v4/issues.json b/spec/fixtures/api/schemas/public_api/v4/issues.json new file mode 100644 index 00000000000..52199e75734 --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/issues.json @@ -0,0 +1,76 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties" : { + "id": { "type": "integer" }, + "iid": { "type": "integer" }, + "project_id": { "type": "integer" }, + "title": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "state": { "type": "string" }, + "created_at": { "type": "date" }, + "updated_at": { "type": "date" }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "milestone": { + "type": "object", + "properties": { + "id": { "type": "integer" }, + "iid": { "type": "integer" }, + "project_id": { "type": "integer" }, + "title": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "state": { "type": "string" }, + "created_at": { "type": "date" }, + "updated_at": { "type": "date" }, + "due_date": { "type": "date" }, + "start_date": { "type": "date" } + }, + "additionalProperties": false + }, + "assignee": { + "type": ["object", "null"], + "properties": { + "name": { "type": "string" }, + "username": { "type": "string" }, + "id": { "type": "integer" }, + "state": { "type": "string" }, + "avatar_url": { "type": "uri" }, + "web_url": { "type": "uri" } + }, + "additionalProperties": false + }, + "author": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "username": { "type": "string" }, + "id": { "type": "integer" }, + "state": { "type": "string" }, + "avatar_url": { "type": "uri" }, + "web_url": { "type": "uri" } + }, + "additionalProperties": false + }, + "user_notes_count": { "type": "integer" }, + "upvotes": { "type": "integer" }, + "downvotes": { "type": "integer" }, + "due_date": { "type": ["date", "null"] }, + "confidential": { "type": "boolean" }, + "web_url": { "type": "uri" } + }, + "required": [ + "id", "iid", "project_id", "title", "description", + "state", "created_at", "updated_at", "labels", + "milestone", "assignee", "author", "user_notes_count", + "upvotes", "downvotes", "due_date", "confidential", + "web_url" + ], + "additionalProperties": false + } +} diff --git a/spec/fixtures/api/schemas/public_api/v4/merge_requests.json b/spec/fixtures/api/schemas/public_api/v4/merge_requests.json new file mode 100644 index 00000000000..51642e8cbb8 --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/merge_requests.json @@ -0,0 +1,88 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties" : { + "id": { "type": "integer" }, + "iid": { "type": "integer" }, + "project_id": { "type": "integer" }, + "title": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "state": { "type": "string" }, + "created_at": { "type": "date" }, + "updated_at": { "type": "date" }, + "target_branch": { "type": "string" }, + "source_branch": { "type": "string" }, + "upvotes": { "type": "integer" }, + "downvotes": { "type": "integer" }, + "author": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "username": { "type": "string" }, + "id": { "type": "integer" }, + "state": { "type": "string" }, + "avatar_url": { "type": "uri" }, + "web_url": { "type": "uri" } + }, + "additionalProperties": false + }, + "assignee": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "username": { "type": "string" }, + "id": { "type": "integer" }, + "state": { "type": "string" }, + "avatar_url": { "type": "uri" }, + "web_url": { "type": "uri" } + }, + "additionalProperties": false + }, + "source_project_id": { "type": "integer" }, + "target_project_id": { "type": "integer" }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "work_in_progress": { "type": "boolean" }, + "milestone": { + "type": ["object", "null"], + "properties": { + "id": { "type": "integer" }, + "iid": { "type": "integer" }, + "project_id": { "type": "integer" }, + "title": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "state": { "type": "string" }, + "created_at": { "type": "date" }, + "updated_at": { "type": "date" }, + "due_date": { "type": "date" }, + "start_date": { "type": "date" } + }, + "additionalProperties": false + }, + "merge_when_pipeline_succeeds": { "type": "boolean" }, + "merge_status": { "type": "string" }, + "sha": { "type": "string" }, + "merge_commit_sha": { "type": ["string", "null"] }, + "user_notes_count": { "type": "integer" }, + "should_remove_source_branch": { "type": ["boolean", "null"] }, + "force_remove_source_branch": { "type": ["boolean", "null"] }, + "web_url": { "type": "uri" } + }, + "required": [ + "id", "iid", "project_id", "title", "description", + "state", "created_at", "updated_at", "target_branch", + "source_branch", "upvotes", "downvotes", "author", + "assignee", "source_project_id", "target_project_id", + "labels", "work_in_progress", "milestone", "merge_when_pipeline_succeeds", + "merge_status", "sha", "merge_commit_sha", "user_notes_count", + "should_remove_source_branch", "force_remove_source_branch", + "web_url" + ], + "additionalProperties": false + } +} -- cgit v1.2.1