Add install generator and support Rails 3 or 4

This commit is contained in:
domaindrivendev
2015-12-10 18:24:35 -08:00
parent 13b0fe83c5
commit ec2bda1e3d
25 changed files with 284 additions and 191 deletions

View File

@@ -2,21 +2,22 @@
"swagger": "2.0",
"info": {
"version": "0.0.0",
"title": "Dummy app for testing swagger_rails"
"title": "[Enter a description for your API here]",
"description": "The docs below are powered by the default swagger.json that was installed with swagger_rails. You can update it to describe your API. See here for the complete swagger spec - https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md"
},
"paths": {
"/events": {
"/a/sample/resource": {
"post": {
"tags": [
"events"
"a/sample/resource"
],
"description": "Create a new Event",
"description": "Create a new sample resource",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/CreateEventBody"
"$ref": "#/definitions/CreateSampleResource"
}
}
],
@@ -29,7 +30,7 @@
}
},
"definitions": {
"CreateEventBody": {
"CreateSampleResource": {
"properties": {
"name": {
"type": "string"
@@ -37,60 +38,6 @@
"date_time": {
"type": "string",
"format": "date-time"
},
"repeat": {
"$ref": "#/definitions/EventRepeatOptions"
},
"notification": {
"$ref": "#/definitions/EventNotificationOptions"
}
}
},
"EventRepeatOptions": {
"properties": {
"frequency": {
"type": "string",
"enum": [
"daily"
]
},
"ending_on": {
"type": "string",
"format": "date-time"
}
}
},
"EventNotificationOptions": {
"properties": {
"intervals": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
}
},
"targets": {
"type": "array",
"items": {
"$ref": "#/definitions/NotificationTarget"
}
}
}
},
"NotificationTarget": {
"properties": {
"type": {
"type": "string",
"enum": [
"sms",
"email"
]
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
}
}
}