swagger: "2.0" info: description: register your releases and see how long it takes your commits to go production version: "1.0.0" title: Agility contact: name: Bruno Cruz email: brunolimacruz@gmail.com basePath: /api host: localhost:7000 consumes: - application/json produces: - application/json schemes: - http paths: /apps: post: summary: create an application so you can register your releases parameters: - in: body name: application required: true schema: $ref: "#/definitions/Application" responses: "201": description: Application created get: summary: list applications responses: '200': description: applications schema: type: array items: $ref: '#/definitions/Application' /apps/{app_name}/issues: put: summary: change issue patterns from an application parameters: - name: app_name in: path required: true type: string - in: body name: issue_pattern required: true schema: $ref: "#/definitions/IssuePattern" responses: "204": description: Pattens updated get: summary: list applications responses: '200': description: applications schema: type: array items: $ref: '#/definitions/Application' /apps/{app_name}/releases: post: summary: creates a release parameters: - name: app_name in: path required: true type: string - name: release in: body required: true schema: $ref: '#/definitions/ReleaseNew' responses: 201: description: Release created get: summary: list releases from an application parameters: - name: app_name in: path required: true type: string responses: '200': description: releases with difference schema: type: array items: $ref: '#/definitions/ReleaseList' /apps/{app_name}/releases/{release_name}: delete: summary: delete a release parameters: - name: app_name in: path required: true type: string - name: release_name in: path required: true type: string responses: 204: description: Release Deleted definitions: Application: type: object properties: name: type: string description: Application name milestone: type: string description: Tag name or commit hash that will be used for the first reference issues: type: object properties: patterns: type: array description: the issue should start with this pattern and a sequence of numbers repository: type: object description: git repository information(must have read permission) properties: name: type: string owner: type: string description: Repository's owner IssuePattern: type: object properties: patterns: type: array description: the issue should start with this pattern and a sequence of numbers ReleaseList: type: object properties: name: type: string description: Releases' name, it has to be a tag our commit hash environment: type: string description: Environment where the release happened reference: type: object properties: type: type: string enum: [build, git] issues: type: array diff: type: object properties: milliseconds: type: integer format: int32 description: Difference from the previous release(milliseconds) percentile_95: type: integer format: int32 size: type: integer format: int32 description: Amount of commits additions: type: integer format: int32 description: Lines added in this release deletions: type: integer format: int32 description: Lines removed in this release ReleaseNew: type: object properties: name: type: string description: Releases' name, it has to be a tag our commit hash environment: type: string description: Environment where the release happened example: production reference: type: object properties: type: type: string enum: [build, git] Team: type: object properties: amount: type: integer format: int32 since: type: string format: date example: "2000-12-31"