Last active
May 1, 2016 17:15
-
-
Save qaisjp/65dc0bbcba311ca731bbc0b78ef34f34 to your computer and use it in GitHub Desktop.
dubtrack fm swagger yaml docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| swagger: '2.0' | |
| info: | |
| title: Dubtrack API | |
| description: | | |
| Unofficial documentation. All responses are wrapped in `{ code: 200, data: <response>, message: "OK" }`. | |
| version: "1.0.0" | |
| # the domain of the service | |
| host: api.dubtrack.com | |
| # array of all schemes that your API supports | |
| schemes: | |
| - https # http is redirected here | |
| # will be prefixed to all paths | |
| basePath: / | |
| produces: | |
| - application/json | |
| paths: | |
| /user/{user_id}: | |
| get: | |
| summary: The User endpoint returns information about a user. | |
| tags: | |
| - user | |
| parameters: | |
| - name: user_id | |
| in: path | |
| type: string | |
| required: true | |
| description: A user ID or their username | |
| responses: | |
| 200: | |
| description: User information | |
| schema: | |
| $ref: '#/definitions/User' | |
| /auth/session: | |
| get: | |
| summary: The User Sesssion endpoint returns information about the currently authenticated user. | |
| tags: | |
| - auth | |
| responses: | |
| 200: | |
| description: Profile information for a user | |
| schema: | |
| $ref: '#/definitions/User' | |
| default: | |
| description: Unexpected error | |
| schema: | |
| $ref: '#/definitions/Error' | |
| /__example: | |
| get: | |
| tags: | |
| - test | |
| summary: Example | |
| description: Example for documentation development | |
| parameters: | |
| - name: start_longitude | |
| in: query | |
| description: Longitude component of start location. | |
| required: true | |
| type: number | |
| format: double | |
| - name: customer_uuid | |
| in: query | |
| type: string | |
| format: uuid | |
| description: Unique customer identifier to be used for experience customization. | |
| - name: limit | |
| in: query | |
| type: integer | |
| format: int32 | |
| description: Number of items to retrieve. Default is 5, maximum is 100. | |
| responses: | |
| 200: | |
| description: User information | |
| schema: | |
| $ref: '#/definitions/Activities' | |
| definitions: | |
| User: | |
| type: object | |
| properties: | |
| _force_updated: | |
| type: integer | |
| _id: | |
| type: string | |
| description: The unique identifer for the user. | |
| created: | |
| type: integer | |
| description: The date the user was created. | |
| dubs: | |
| type: integer | |
| description: | | |
| The number of "dubs" the user has. This may be `0` depending on the context. | |
| profileImage: | |
| $ref: '#/definitions/ProfileImage' | |
| roleid: | |
| type: integer | |
| status: | |
| type: integer | |
| userInfo: | |
| $ref: '#/definitions/UserInfo' | |
| username: | |
| type: string | |
| description: The username of the user. | |
| UserInfo: | |
| type: object | |
| properties: | |
| _id: | |
| type: string | |
| description: The unique identifier for this "light user". | |
| locale: | |
| type: string | |
| userid: | |
| $ref: '#/definitions/UserInfo/properties/userid' | |
| ProfileImage: | |
| type: object | |
| description: The profile picture of a user | |
| properties: | |
| bytes: | |
| type: integer | |
| description: The size of this profile picture. | |
| etag: | |
| type: string | |
| format: | |
| description: The image file type | |
| type: string | |
| enum: ["jpg", "png", "gif"] # incomplete | |
| width: | |
| type: integer | |
| height: | |
| type: integer | |
| public_id: | |
| type: string | |
| resource_type: | |
| type: string | |
| description: | | |
| "image" | |
| url: | |
| type: string | |
| secure_url: | |
| type: string | |
| type: | |
| type: string | |
| description: | | |
| "upload" | |
| version: | |
| type: integer | |
| Error: | |
| type: object | |
| properties: | |
| code: | |
| type: integer | |
| format: int32 | |
| message: | |
| type: string | |
| fields: | |
| type: string | |
| ## test definition! | |
| Activities: | |
| type: object | |
| properties: | |
| offset: | |
| type: integer | |
| format: int32 | |
| description: Position in pagination. | |
| history: | |
| type: array | |
| items: | |
| $ref: '#/definitions/Error' # contains array of errors yay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment