20 lines
566 B
Ruby
20 lines
566 B
Ruby
|
|
require_relative "request_parser"
|
||
|
|
|
||
|
|
module Devops
|
||
|
|
module API2_0
|
||
|
|
module Parser
|
||
|
|
class DeployParser < RequestParser
|
||
|
|
|
||
|
|
def deploy
|
||
|
|
r = create_object_from_json_body
|
||
|
|
names = check_array(r["names"], "Parameter 'names' should be a not empty array of strings")
|
||
|
|
tags = check_array(r["tags"], "Parameter 'tags' should be an array of strings", String, true)
|
||
|
|
build_number = check_string(r["build_number"], "Parameter 'build_number' should be a not empty string", true)
|
||
|
|
r
|
||
|
|
end
|
||
|
|
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|