2016-09-14 19:20:26 +00:00
{
"puppet_classes" : [
{
"name" : "klass" ,
"file" : "(stdin)" ,
"line" : 5 ,
"inherits" : "foo::bar" ,
"docstring" : {
"text" : "A simple class." ,
"tags" : [
{
"tag_name" : "param" ,
"text" : "First param." ,
"types" : [
"Integer"
] ,
"name" : "param1"
} ,
{
"tag_name" : "param" ,
"text" : "Second param." ,
"types" : [
"Any"
] ,
"name" : "param2"
} ,
{
"tag_name" : "param" ,
"text" : "Third param." ,
"types" : [
"String"
] ,
"name" : "param3"
}
]
} ,
"defaults" : {
"param3" : "hi"
} ,
"source" : "class klass(Integer $param1, $param2, String $param3 = hi) inherits foo::bar {\n}"
}
] ,
"defined_types" : [
{
"name" : "dt" ,
"file" : "(stdin)" ,
"line" : 12 ,
"docstring" : {
"text" : "A simple defined type." ,
"tags" : [
{
"tag_name" : "param" ,
"text" : "First param." ,
"types" : [
"Integer"
] ,
"name" : "param1"
} ,
{
"tag_name" : "param" ,
"text" : "Second param." ,
"types" : [
"Any"
] ,
"name" : "param2"
} ,
{
"tag_name" : "param" ,
"text" : "Third param." ,
"types" : [
"String"
] ,
"name" : "param3"
}
]
} ,
"defaults" : {
"param3" : "hi"
} ,
"source" : "define dt(Integer $param1, $param2, String $param3 = hi) {\n}"
}
] ,
"resource_types" : [
{
"name" : "database" ,
"file" : "(stdin)" ,
2016-11-01 22:58:30 +00:00
"line" : 54 ,
2016-09-14 19:20:26 +00:00
"docstring" : {
"text" : "An example database server resource type."
} ,
"properties" : [
{
"name" : "ensure" ,
"description" : "What state the database should be in." ,
"values" : [
"present" ,
"absent" ,
"up" ,
"down"
] ,
"aliases" : {
"up" : "present" ,
"down" : "absent"
} ,
"default" : "up"
} ,
{
"name" : "file" ,
"description" : "The database file to use."
} ,
{
"name" : "log_level" ,
"description" : "The log level to use." ,
"values" : [
"debug" ,
"warn" ,
"error"
] ,
"default" : "warn"
}
] ,
"parameters" : [
{
"name" : "address" ,
"description" : "The database server name." ,
"isnamevar" : true
} ,
{
"name" : "encryption_key" ,
"description" : "The encryption key to use."
} ,
{
"name" : "encrypt" ,
"description" : "Whether or not to encrypt the database." ,
"values" : [
"true" ,
"false" ,
"yes" ,
"no"
] ,
"default" : "false"
}
] ,
"features" : [
{
"name" : "encryption" ,
"description" : "The provider supports encryption."
}
]
}
] ,
"providers" : [
{
"name" : "linux" ,
"type_name" : "database" ,
"file" : "(stdin)" ,
2016-11-01 22:58:30 +00:00
"line" : 43 ,
2016-09-14 19:20:26 +00:00
"docstring" : {
"text" : "An example provider on Linux."
} ,
"confines" : {
"kernel" : "Linux" ,
"osfamily" : "RedHat"
} ,
"features" : [
"implements_some_feature" ,
"some_other_feature"
] ,
2016-10-11 19:45:17 +00:00
"defaults" : [
[
[
"kernel" ,
"Linux"
]
] ,
[
[
"osfamily" ,
"RedHat"
] ,
[
"operatingsystemmajrelease" ,
"7"
]
]
] ,
2016-09-14 19:20:26 +00:00
"commands" : {
"foo" : "/usr/bin/foo"
}
}
] ,
"puppet_functions" : [
{
"name" : "func" ,
"file" : "(stdin)" ,
2016-09-16 19:15:26 +00:00
"line" : 6 ,
2016-09-14 19:20:26 +00:00
"type" : "puppet" ,
2016-11-01 22:58:30 +00:00
"signatures" : [
{
"signature" : "func(Integer $param1, Any $param2, String $param3 = hi)" ,
"docstring" : {
"text" : "A simple function." ,
"tags" : [
{
"tag_name" : "param" ,
"text" : "First param." ,
"types" : [
"Integer"
] ,
"name" : "param1"
} ,
{
"tag_name" : "param" ,
"text" : "Second param." ,
"types" : [
"Any"
] ,
"name" : "param2"
} ,
{
"tag_name" : "param" ,
"text" : "Third param." ,
"types" : [
"String"
] ,
"name" : "param3"
} ,
{
"tag_name" : "return" ,
"text" : "Returns nothing." ,
"types" : [
"Undef"
]
}
]
}
}
] ,
2016-09-14 19:20:26 +00:00
"docstring" : {
"text" : "A simple function." ,
"tags" : [
{
"tag_name" : "param" ,
"text" : "First param." ,
"types" : [
"Integer"
] ,
"name" : "param1"
} ,
{
"tag_name" : "param" ,
"text" : "Second param." ,
"types" : [
"Any"
] ,
"name" : "param2"
} ,
{
"tag_name" : "param" ,
"text" : "Third param." ,
"types" : [
"String"
] ,
"name" : "param3"
} ,
{
"tag_name" : "return" ,
"text" : "Returns nothing." ,
"types" : [
"Undef"
]
}
]
} ,
"defaults" : {
"param3" : "hi"
} ,
"source" : "function func(Integer $param1, $param2, String $param3 = hi) {\n}"
} ,
{
"name" : "func3x" ,
"file" : "(stdin)" ,
"line" : 1 ,
"type" : "ruby3x" ,
2016-11-01 22:58:30 +00:00
"signatures" : [
{
"signature" : "func3x(String $first, Any $second)" ,
"docstring" : {
"text" : "An example 3.x function." ,
"tags" : [
{
"tag_name" : "param" ,
"text" : "The first parameter." ,
"types" : [
"String"
] ,
"name" : "first"
} ,
{
"tag_name" : "param" ,
"text" : "The second parameter." ,
"types" : [
"Any"
] ,
"name" : "second"
} ,
{
"tag_name" : "return" ,
"text" : "Returns nothing." ,
"types" : [
"Undef"
]
}
]
}
}
] ,
2016-09-14 19:20:26 +00:00
"docstring" : {
"text" : "An example 3.x function." ,
"tags" : [
{
"tag_name" : "param" ,
"text" : "The first parameter." ,
"types" : [
"String"
] ,
"name" : "first"
} ,
{
"tag_name" : "param" ,
"text" : "The second parameter." ,
"types" : [
"Any"
] ,
"name" : "second"
} ,
{
"tag_name" : "return" ,
"text" : "Returns nothing." ,
"types" : [
"Undef"
]
}
]
} ,
"source" : "Puppet::Parser::Functions.newfunction(:func3x, doc: <<-DOC\nAn example 3.x function.\n@param [String] first The first parameter.\n@param second The second parameter.\n@return [Undef] Returns nothing.\nDOC\n) do |*args|\nend"
} ,
{
"name" : "func4x" ,
"file" : "(stdin)" ,
"line" : 11 ,
"type" : "ruby4x" ,
2016-11-01 22:58:30 +00:00
"signatures" : [
{
"signature" : "func4x(Integer $param1, Any $param2, Optional[Array[String]] $param3)" ,
"docstring" : {
"text" : "The first overload." ,
"tags" : [
{
"tag_name" : "param" ,
"text" : "The first parameter." ,
"types" : [
"Integer"
] ,
"name" : "param1"
} ,
{
"tag_name" : "param" ,
"text" : "The second parameter." ,
"types" : [
"Any"
] ,
"name" : "param2"
} ,
{
"tag_name" : "param" ,
"text" : "The third parameter." ,
"types" : [
"Optional[Array[String]]"
] ,
"name" : "param3"
} ,
{
"tag_name" : "return" ,
"text" : "Returns nothing." ,
"types" : [
"Undef"
]
}
]
}
} ,
{
"signature" : "func4x(Boolean $param, Callable &$block)" ,
"docstring" : {
"text" : "" ,
"tags" : [
{
"tag_name" : "param" ,
"text" : "The first parameter." ,
"types" : [
"Boolean"
] ,
"name" : "param"
} ,
{
"tag_name" : "param" ,
"text" : "The block parameter." ,
"types" : [
"Callable"
] ,
"name" : "&block"
} ,
{
"tag_name" : "return" ,
"text" : "Returns a string." ,
"types" : [
"String"
]
}
]
}
}
] ,
2016-09-14 19:20:26 +00:00
"docstring" : {
"text" : "An example 4.x function." ,
"tags" : [
{
"tag_name" : "overload" ,
"signature" : "func4x(Integer $param1, Any $param2, Optional[Array[String]] $param3)" ,
"docstring" : {
"text" : "The first overload." ,
"tags" : [
{
"tag_name" : "param" ,
"text" : "The first parameter." ,
"types" : [
"Integer"
] ,
"name" : "param1"
} ,
{
"tag_name" : "param" ,
"text" : "The second parameter." ,
"types" : [
"Any"
] ,
"name" : "param2"
} ,
{
"tag_name" : "param" ,
"text" : "The third parameter." ,
"types" : [
"Optional[Array[String]]"
] ,
"name" : "param3"
} ,
{
"tag_name" : "return" ,
"text" : "Returns nothing." ,
"types" : [
"Undef"
]
}
]
} ,
"name" : "func4x"
} ,
{
"tag_name" : "overload" ,
"signature" : "func4x(Boolean $param, Callable &$block)" ,
"docstring" : {
2016-11-04 20:08:45 +00:00
"text" : "" ,
2016-09-14 19:20:26 +00:00
"tags" : [
{
"tag_name" : "param" ,
"text" : "The first parameter." ,
"types" : [
"Boolean"
] ,
"name" : "param"
} ,
{
"tag_name" : "param" ,
"text" : "The block parameter." ,
"types" : [
"Callable"
] ,
"name" : "&block"
} ,
{
"tag_name" : "return" ,
"text" : "Returns a string." ,
"types" : [
"String"
]
}
]
} ,
"name" : "func4x"
}
]
} ,
2016-11-04 20:08:45 +00:00
"source" : "Puppet::Functions.create_function(:func4x) do\n # The first overload.\n # @param param1 The first parameter.\n # @param param2 The second parameter.\n # @param param3 The third parameter.\n # @return Returns nothing.\n dispatch :foo do\n param 'Integer', :param1\n param 'Any', :param2\n optional_param 'Array[String]', :param3\n return_type 'Undef'\n end\n\n # @param param The first parameter.\n # @param block The block parameter.\n # @return Returns a string.\n dispatch :other do\n param 'Boolean', :param\n block_param\n return_type 'String'\n end\nend"
2016-11-01 22:58:30 +00:00
} ,
{
"name" : "func4x_1" ,
"file" : "(stdin)" ,
"line" : 35 ,
"type" : "ruby4x" ,
"signatures" : [
{
"signature" : "func4x_1(Integer $param1)" ,
"docstring" : {
"text" : "An example 4.x function with only one signature." ,
"tags" : [
{
"tag_name" : "param" ,
"text" : "The first parameter." ,
"types" : [
"Integer"
] ,
"name" : "param1"
} ,
{
"tag_name" : "return" ,
"text" : "Returns nothing." ,
"types" : [
"Undef"
]
}
]
}
}
] ,
"docstring" : {
"text" : "An example 4.x function with only one signature." ,
"tags" : [
{
"tag_name" : "param" ,
"text" : "The first parameter." ,
"types" : [
"Integer"
] ,
"name" : "param1"
} ,
{
"tag_name" : "return" ,
"text" : "Returns nothing." ,
"types" : [
"Undef"
]
}
]
} ,
"source" : "Puppet::Functions.create_function(:func4x_1) do\n # @param param1 The first parameter.\n # @return [Undef] Returns nothing.\n dispatch :foobarbaz do\n param 'Integer', :param1\n end\nend"
2016-09-14 19:20:26 +00:00
}
]
}