Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module ApiSpec; end

require 'generator'

require 'specs/automation_enrollments'
require 'specs/basic_pages'
require 'specs/blog_posts'
require 'specs/blogs'
Expand Down
47 changes: 47 additions & 0 deletions lib/api_spec/specs/automation_enrollments.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
class ApiSpec::Spec

endpoint 'Automation Enrollments' do |automation_enrollments|

automation_enrollments.method('Index') do |method|
method.synopsis = 'Shows the list of automation enrollments'
method.http_method = 'GET'
method.uri = '/v1/automations/:id/automation_enrollments'

method.parameter('id') do |p|
p.required = 'Y'
p.type = 'int'
p.description = 'The Automation ID that contains all automation enrollments requested'
end
end

automation_enrollments.method('Create') do |method|
method.synopsis = 'Creates an automation enrollment with the provided data'
method.http_method = 'POST'
method.uri = '/v1/automations/:id/automation_enrollments'

method.parameter('body') do |p|
p.required = 'Y'
p.type = 'json'
p.description = 'JSON representation of the new automation enrollment'
end
end

automation_enrollments.method('Destroy') do |method|
method.synopsis = 'Destroy a specific Automation Enrollment based on the signup'
method.http_method = 'DELETE'
method.uri = '/v1/automations/:id/automation_enrollments'

method.parameter('signup_id') do |p|
p.required = 'Y'
p.type = 'int'
p.description = 'The Signup id of the automation enrollment'
end

method.parameter('id') do |p|
p.required = 'Y'
p.type = 'int'
p.description = 'The Automation id of the automation enrollment'
end
end
end
end
57 changes: 57 additions & 0 deletions spec.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
{
"endpoints": [
{
"name": "Automation Enrollments",
"methods": [
{
"MethodName": "Index",
"Synopsis": "Shows the list of automation enrollments",
"HTTPMethod": "GET",
"URI": "/v1/automations/:id/automation_enrollments",
"parameters": [
{
"Name": "id",
"Required": "Y",
"Default": null,
"Type": "int",
"Description": "The Automation ID that contains all automation enrollments requested"
}
]
},
{
"MethodName": "Create",
"Synopsis": "Creates an automation enrollment with the provided data",
"HTTPMethod": "POST",
"URI": "/v1/automations/:id/automation_enrollments",
"parameters": [
{
"Name": "body",
"Required": "Y",
"Default": null,
"Type": "json",
"Description": "JSON representation of the new automation enrollment"
}
]
},
{
"MethodName": "Destroy",
"Synopsis": "Destroy a specific Automation Enrollment based on the signup",
"HTTPMethod": "DELETE",
"URI": "/v1/automations/:id/automation_enrollments",
"parameters": [
{
"Name": "signup_id",
"Required": "Y",
"Default": null,
"Type": "int",
"Description": "The Signup id of the automation enrollment"
},
{
"Name": "id",
"Required": "Y",
"Default": null,
"Type": "int",
"Description": "The Automation id of the automation enrollment"
}
]
}
]
},
{
"name": "Basic Pages",
"methods": [
Expand Down