Last active
December 29, 2016 09:51
-
-
Save hoozecn/05ab477a6f738a9512d1aa1c20c9ca29 to your computer and use it in GitHub Desktop.
test.json
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": { | |
"description": "No description", | |
"version": "0.1.0", | |
"title": "rewhiz", | |
"contact": {}, | |
"license": { | |
"name": "Private" | |
} | |
}, | |
"host": "www.rewhiz.com", | |
"basePath": "/api/v1", | |
"tags": [ | |
{ | |
"name": "subscriptions" | |
} | |
], | |
"schemes": [ | |
"https" | |
], | |
"paths": { | |
"/subsriptions/{accountId}": { | |
"get": { | |
"tags": [ | |
"subscriptions" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "accountId", | |
"in": "path", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/SubscriptionList" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"ProductAttribute": { | |
"type": "object", | |
"required": [ | |
"key" | |
], | |
"properties": { | |
"key": { | |
"type": "string", | |
"description": "The key name of attribute" | |
}, | |
"value": { | |
"type": "string", | |
"description": "The value of attribute" | |
} | |
} | |
}, | |
"Product": { | |
"type": "object", | |
"required": [ | |
"description", | |
"icon", | |
"id", | |
"metered", | |
"name", | |
"unit" | |
], | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"icon": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"unit": { | |
"type": "string" | |
}, | |
"attributes": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/ProductAttribute" | |
} | |
}, | |
"metered": { | |
"type": "boolean", | |
"default": false | |
} | |
}, | |
"description": "Product is a service that matches a unique description" | |
}, | |
"Subscription": { | |
"type": "object", | |
"required": [ | |
"id", | |
"product", | |
"type" | |
], | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"product": { | |
"$ref": "#/definitions/Product" | |
}, | |
"type": { | |
"type": "string" | |
}, | |
"parentSubscriptionId": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"trail": { | |
"type": "boolean", | |
"default": false | |
}, | |
"subSubscriptions": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Subscription" | |
} | |
} | |
} | |
}, | |
"SubscriptionList": { | |
"type": "object", | |
"required": [ | |
"items", | |
"maxResults", | |
"totalResults" | |
], | |
"properties": { | |
"maxResults": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"totalResults": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"nextIndex": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Subscription" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment