diff --git a/lib/api_spec.rb b/lib/api_spec.rb index 023aed4..d4a4a45 100644 --- a/lib/api_spec.rb +++ b/lib/api_spec.rb @@ -4,6 +4,7 @@ module ApiSpec; end require 'generator' +require 'specs/automation_enrollments' require 'specs/basic_pages' require 'specs/blog_posts' require 'specs/blogs' diff --git a/lib/api_spec/specs/automation_enrollments.rb b/lib/api_spec/specs/automation_enrollments.rb new file mode 100644 index 0000000..25476a6 --- /dev/null +++ b/lib/api_spec/specs/automation_enrollments.rb @@ -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 diff --git a/spec.json b/spec.json index b46258b..393958b 100644 --- a/spec.json +++ b/spec.json @@ -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": [