Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

Commit

Permalink
WIP: move all URL/query parameters to parameters.json
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Nov 13, 2018
1 parent c354639 commit 9106762
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 80 deletions.
89 changes: 9 additions & 80 deletions openapi/operations/issues/list-for-repo.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,102 +16,31 @@
"$ref": "../../parameters.json#/repo"
},
{
"name": "milestone",
"in": "query",
"schema": {
"oneOf": [{
"type": "integer",
"minimum": 1
},
{
"type": "string",
"enum": ["*", "none"]
}
]
},
"description": "If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned."
"$ref": "../../parameters.json#/milestone"
},
{
"name": "state",
"in": "query",
"schema": {
"type": "string",
"enum": [
"open",
"closed",
"all"
],
"default": "open"
},
"description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`."
"$ref": "../../parameters.json#/state"
},
{
"name": "assignee",
"in": "query",
"schema": {
"type": "string"
},
"description": "Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user."
"$ref": "../../parameters.json#/assignee"
},
{
"name": "creator",
"in": "query",
"schema": {
"type": "string"
},
"description": "The user that created the issue."
"$ref": "../../parameters.json#/creator"
},
{
"name": "mentioned",
"in": "query",
"schema": {
"type": "string"
},
"description": "A user that's mentioned in the issue."
"$ref": "../../parameters.json#/mentioned"
},
{
"name": "labels",
"in": "query",
"schema": {
"type": "string"
},
"description": "A list of comma separated label names. Example: `bug,ui,@high`"
"$ref": "../../parameters.json#/labels"
},
{
"name": "sort",
"in": "query",
"schema": {
"type": "string",
"enum": [
"created",
"updated",
"comments"
],
"default": "created"
},
"description": "What to sort results by. Can be either `created`, `updated`, `comments`."
"$ref": "../../parameters.json#/sort"
},
{
"name": "direction",
"in": "query",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
],
"default": "desc"
},
"description": "The direction of the sort. Can be either `asc` or `desc`."
"$ref": "../../parameters.json#/direction"
},
{
"name": "since",
"in": "query",
"schema": {
"type": "string",
"format": "date-time"
},
"description": "Only issues updated at or after this time are returned. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`."
"$ref": "../../parameters.json#/since"
},
{
"$ref": "../../parameters.json#/per_page"
Expand Down
98 changes: 98 additions & 0 deletions openapi/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,103 @@
"default": 1
},
"description": "Page number of the results to fetch."
},
"milestone": {
"name": "milestone",
"in": "query",
"schema": {
"oneOf": [{
"type": "integer",
"minimum": 1
},
{
"type": "string",
"enum": ["*", "none"]
}
]
},
"description": "If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned."
},
"state": {
"name": "state",
"in": "query",
"schema": {
"type": "string",
"enum": [
"open",
"closed",
"all"
],
"default": "open"
},
"description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`."
},
"assignee": {
"name": "assignee",
"in": "query",
"schema": {
"type": "string"
},
"description": "Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user."
},
"creator": {
"name": "creator",
"in": "query",
"schema": {
"type": "string"
},
"description": "The user that created the issue."
},
"mentioned": {
"name": "mentioned",
"in": "query",
"schema": {
"type": "string"
},
"description": "A user that's mentioned in the issue."
},
"labels": {
"name": "labels",
"in": "query",
"schema": {
"type": "string"
},
"description": "A list of comma separated label names. Example: `bug,ui,@high`"
},
"sort": {
"name": "sort",
"in": "query",
"schema": {
"type": "string",
"enum": [
"created",
"updated",
"comments"
],
"default": "created"
},
"description": "What to sort results by. Can be either `created`, `updated`, `comments`."
},
"direction": {
"name": "direction",
"in": "query",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
],
"default": "desc"
},
"description": "The direction of the sort. Can be either `asc` or `desc`."
},
"since": {
"name": "since",
"in": "query",
"schema": {
"type": "string",
"format": "date-time"
},
"description": "Only issues updated at or after this time are returned. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`."
}
}

0 comments on commit 9106762

Please sign in to comment.