summaryrefslogtreecommitdiff
path: root/spec/fixtures/api/schemas
diff options
context:
space:
mode:
authorJacopo <beschi.jacopo@gmail.com>2017-11-18 15:06:55 +0100
committerJacopo <beschi.jacopo@gmail.com>2017-12-13 18:02:20 +0100
commit55f322085d0507640366b7a774fe7819771ff54b (patch)
tree30fcb5e3f952fa007445342cbd67802a7f0958e3 /spec/fixtures/api/schemas
parent6930fa3102f0ba197e969f9996e86bf11346470c (diff)
downloadgitlab-ce-55f322085d0507640366b7a774fe7819771ff54b.tar.gz
Adds ordering to projects contributors in API
Allows ordering in GET api/v4/projects/:project_id/repository/contributors through `order_by` and `sort` params. The available `order_by` options are: name|email|commits. The available `sort` options are: asc|desc.
Diffstat (limited to 'spec/fixtures/api/schemas')
-rw-r--r--spec/fixtures/api/schemas/contributor.json18
-rw-r--r--spec/fixtures/api/schemas/contributors.json4
2 files changed, 22 insertions, 0 deletions
diff --git a/spec/fixtures/api/schemas/contributor.json b/spec/fixtures/api/schemas/contributor.json
new file mode 100644
index 00000000000..e88470a2363
--- /dev/null
+++ b/spec/fixtures/api/schemas/contributor.json
@@ -0,0 +1,18 @@
+{
+ "type": "object",
+ "required" : [
+ "name",
+ "email",
+ "commits",
+ "additions",
+ "deletions"
+ ],
+ "properties" : {
+ "name": { "type": "string" },
+ "email": { "type": "string" },
+ "commits": { "type": "integer" },
+ "additions": { "type": "integer" },
+ "deletions": { "type": "integer" }
+ },
+ "additionalProperties": false
+}
diff --git a/spec/fixtures/api/schemas/contributors.json b/spec/fixtures/api/schemas/contributors.json
new file mode 100644
index 00000000000..a9f1d1ea64f
--- /dev/null
+++ b/spec/fixtures/api/schemas/contributors.json
@@ -0,0 +1,4 @@
+{
+ "type": "array",
+ "items": { "$ref": "contributor.json" }
+}