Merge pull request #1304 from donny-dont/patch-2

Adding more documentation to the swagger
This commit is contained in:
Brad Rydzewski 2015-11-06 13:34:56 -08:00
commit 427560a52d

View file

@ -608,6 +608,7 @@ paths:
definitions: definitions:
User: User:
description: The user account.
example: | example: |
{ {
"id": 1, "id": 1,
@ -619,21 +620,27 @@ definitions:
} }
properties: properties:
id: id:
description: The unique identifier for the account.
type: integer type: integer
format: int64 format: int64
login: login:
description: The login name for the account.
type: string type: string
email: email:
description: The email address for the account.
type: string type: string
avatar_url: avatar_url:
description: The url for the avatar image.
type: string type: string
admin: admin:
description: Whether the account has administrative priviledges.
type: boolean type: boolean
active: active:
description: Whether the account is currently active.
type: boolean type: boolean
Repo: Repo:
description: A version control repository.
example: | example: |
{ {
"id": 1, "id": 1,
@ -655,41 +662,68 @@ definitions:
} }
properties: properties:
id: id:
description: The unique identifier for the repository.
type: integer type: integer
format: int64 format: int64
scm: scm:
description: |
The source control management being used.
Currently this is either 'git' or 'hg' (Mercurial).
type: string type: string
owner: owner:
description: The owner of the repository.
type: string type: string
name: name:
description: The name of the repository.
type: string type: string
full_name: full_name:
description: |
The full name of the repository.
This is created from the owner and name of the repository.
type: string type: string
avatar_url: avatar_url:
description: The url for the avatar image.
type: string type: string
link_url: link_url:
description: The link to view the repository.
type: string type: string
clone_url: clone_url:
description: The url used to clone the repository.
type: string type: string
default_branch: default_branch:
description: The default branch of the repository.
type: string type: string
private: private:
description: Whether the repository is publicly visible.
type: boolean type: boolean
trusted: trusted:
description: |
Whether the repository has trusted access for builds.
If the repository is trusted then the host network can be used and
volumes can be created.
type: boolean type: boolean
timeout: timeout:
description: The amount of time in minutes before the build is killed.
type: integer type: integer
x-dart-type: Duration
allow_pr: allow_pr:
description: Whether pull requests should trigger a build.
type: boolean type: boolean
allow_push: allow_push:
description: Whether push events should trigger a build.
type: boolean type: boolean
allow_deploys: allow_deploys:
description: Whether deployment events should trigger a build.
type: boolean type: boolean
allow_tags: allow_tags:
description: Whether tags should trigger a build.
type: boolean type: boolean
Build: Build:
description: A build for a repository.
example: | example: |
{ {
"id": 1, "id": 1,
@ -738,8 +772,89 @@ definitions:
type: integer type: integer
format: int64 format: int64
number: number:
description: |
The build number.
This number is specified within the context of the repository the build
belongs to and is unique within that.
type: integer type: integer
status: status:
description: The current status of the build.
$ref: '#definitions/BuildStatus'
created_at:
description: When the build request was received.
type: integer
format: int64
x-dart-type: DateTime
enqueued_at:
description: When the build was enqueued.
type: integer
format: int64
x-dart-type: DateTime
started_at:
description: When the build began execution.
type: integer
format: int64
x-dart-type: DateTime
finished_at:
description: When the build was finished.
type: integer
format: int64
x-dart-type: DateTime
deploy_to:
description: Where the deployment should go.
type: string
commit:
description: The commit for the build.
type: string
branch:
description: The branch the commit was pushed to.
type: string
message:
description: The commit message.
type: string
timestamp:
description: When the commit was created.
type: integer
format: int64
x-dart-format: DateTime
ref:
description: The alias for the commit.
type: string
refspec:
description: The mapping from the local repository to a branch in the remote.
type: string
remote:
description: The remote repository.
type: string
author:
description: The login for the author of the commit.
type: string
author_avatar:
description: The avatar for the author of the commit.
type: string
author_email:
description: The email for the author of the commit.
type: string
link_url:
description: |
The link to view the repository.
This link will point to the repository state associated with the
build's commit.
type: string
jobs:
description: |
The jobs associated with this build.
A build will have multiple jobs if a matrix build was used or if a
rebuild was requested.
type: array
items:
$ref: "#/definitions/Job"
BuildStatus:
description: The status of a build.
type: string type: string
enum: enum:
- success - success
@ -748,49 +863,16 @@ definitions:
- started - started
- error - error
- killed - killed
created_at: x-enum-descriptions:
type: integer - The build was successful.
format: int64 - The build failed.
enqueued_at: - The build is pending execution.
type: integer - The build was started.
format: int64 - There was an error running the build.
started_at: - The build was killed either manually or through a timeout.
type: integer
format: int64
finished_at:
type: integer
format: int64
deploy_to:
type: string
commit:
type: string
branch:
type: string
message:
type: string
timestamp:
type: integer
format: int64
ref:
type: string
refspec:
type: string
remote:
type: string
author:
type: string
author_avatar:
type: string
author_email:
type: string
link_url:
type: string
jobs:
type: array
items:
$ref: "#/definitions/Job"
Job: Job:
description: A single job being executed as part of a build.
example: | example: |
{ {
"id": 1, "id": 1,
@ -804,34 +886,49 @@ definitions:
} }
properties: properties:
id: id:
description: The unique identifier for the build.
type: integer type: integer
format: int64 format: int64
number: number:
description: |
The job number.
This number is specified within the context of the build the job
belongs to and is unique within that.
type: integer type: integer
status: status:
type: string description: The current status of the job.
enum: $ref: '#definitions/BuildStatus'
- success
- failure
- pending
- started
- error
- killed
exit_code: exit_code:
description: The exit code for the build.
type: integer type: integer
enqueued_at: enqueued_at:
description: When the job was enqueued.
type: integer type: integer
format: int64 format: int64
x-dart-type: DateTime
started_at: started_at:
description: When the job began execution.
type: integer type: integer
format: int64 format: int64
x-dart-type: DateTime
finished_at: finished_at:
description: When the job finished execution.
type: integer type: integer
format: int64 format: int64
x-dart-type: DateTime
environment: environment:
description: |
The environment that the job was run with.
This is a map containing any values for matrix builds.
type: object type: object
Feed: Feed:
description: |
A feed entry for a build.
Feed entries can be used to display information on the latest builds.
example: | example: |
{ {
"owner": "octocat", "owner": "octocat",
@ -857,54 +954,83 @@ definitions:
} }
properties: properties:
owner: owner:
description: The owner of the repository.
type: string type: string
name: name:
description: The name of the repository.
type: string type: string
full_name: full_name:
description: |
The full name of the repository.
This is created from the owner and name of the repository.
type: string type: string
number: number:
description: |
The build number.
This number is specified within the context of the repository the build
belongs to and is unique within that.
type: integer type: integer
status: status:
type: string description: The current status of the build.
enum: $ref: '#definitions/BuildStatus'
- success
- failure
- pending
- started
- error
- killed
created_at: created_at:
description: When the build request was received.
type: integer type: integer
format: int64 format: int64
x-dart-type: DateTime
enqueued_at: enqueued_at:
description: When the build was enqueued.
type: integer type: integer
format: int64 format: int64
x-dart-type: DateTime
started_at: started_at:
description: When the build began execution.
type: integer type: integer
format: int64 format: int64
x-dart-type: DateTime
finished_at: finished_at:
description: When the build was finished.
type: integer type: integer
format: int64 format: int64
x-dart-type: DateTime
commit: commit:
description: The commit for the build.
type: string type: string
branch: branch:
description: The branch the commit was pushed to.
type: string type: string
message: message:
description: The commit message.
type: string type: string
timestamp: timestamp:
description: When the commit was created.
type: integer type: integer
format: int64 format: int64
x-dart-format: DateTime
ref: ref:
description: The alias for the commit.
type: string type: string
refspec: refspec:
description: The mapping from the local repository to a branch in the remote.
type: string type: string
remote: remote:
description: The remote repository.
type: string type: string
author: author:
description: The login for the author of the commit.
type: string type: string
author_avatar: author_avatar:
description: The avatar for the author of the commit.
type: string type: string
author_email: author_email:
description: The email for the author of the commit.
type: string type: string
link_url: link_url:
description: |
The link to view the repository.
This link will point to the repository state associated with the
build's commit.
type: string type: string