Text::API::Blueprint - ...
version 0.001
Invokation: Section(
CodeRef $coderef
,
[ Int $offset
= 1
]
)
Increments header offset by $offset
for everything executed in $coderef
.
Invokation: Meta(
[ Str $host
]
)
FORMAT: 1A8
HOST: $host
Invokation: Intro(
Str $name
,
Str $description
)
# $name
$description
Invokation: Concat(
Str @blocks
)
$block[0]
$block[1]
$block[2]
...
Invokation: Text(
Str @strings
)
$string[0]
$string[1]
$string[2]
...
Invokation: Code(
Str $code
,
[ Str $lang
= ''
],
[ Int $delimiters
= 3
]
)
```$lang
$code
```
Invokation: Group(
Str $identifier
,
Str|ArrayRef[HashRef|Str] $body
,
[ Int $indent
]
)
If $body
is an ArrayRef, every item which is a HashRef will be passed to "Resource".
# Group $identifier
$body
Invokation: Resource(
Str :$method
,
Str :$uri
,
Str :$identifier
,
Str|CodeRef :$body
,
Int :$indent
,
Int :$level
,
HashRef :$parameters
,
HashRef :$model
,
ArrayRef :$actions
)
- See "Parameters" for
$parameters
- See "Model" for
$model
- See "Action" for
$actions
With $method
and $uri
## $method $uri
$body
With $identifier
and $uri
## $identifier [$uri]
$body
With $uri
## $uri
$body
Invokation: Model(
Str $media_type
,
Str|HashRef $payload
,
[ Int $indent
]
)
See "Payload" if $payload
is a HashRef.
+ Model ($media_type)
$payload
Invokation: Schema(
Str $body
,
[ Int $indent
]
)
+ Schema
$body
Invokation: Action(
Str :$method
,
Str :$uri
,
Str :$identifier
,
Str|CodeRef :$body
,
Int :$indent
,
Int :$level
,
Str :$relation
,
HashRef :$parameters
,
ArrayRef :$assets
,
ArrayRef :$request
,
ArrayRef :$requests
,
ArrayRef :$response
,
ArrayRef :$responses
)
- See "Section" if
$body
is a CodeRef - See "Parameters" for
$parameters
- See "Asset" for
$assets
- See "Request" for
$request
and$requests
- See "Response" for
$response
and$responses
With $identifier
$method
and $uri
:
### $identifier [$method $uri]
$body
With $identifier
and $method
:
### $identifier [$method]
$body
With $method
:
### $method
$body
Invokation: Payload(
Str :$description
,
HashRef :$headers
,
Str :$body
,
Str :$code
,
Str :$lang
,
AnyRef :$yaml
,
AnyRef :$json
,
Str :$schema
)
- See "Body" for
$body
- See "Body_CODE" for
$code
and$lang
- See "Body_YAML" for
$yaml
- See "Body_JSON" for
$json
Complete output:
$description
+ Headers
$key: $value
+ Body
$body
+ Schema
$schema
With $code
and $lang
:
+ Body
```$lang
$code
```
With $yaml
:
+ Body
```yaml
$yaml
```
With $json
:
+ Body
```json
$json
```
Invokation: Asset(
Str $keyword
,
Str $identifier
,
Str :$type
,
%payload
)
See "Payload" for %payload
# $keyword $identifier ($type)
$payload
Invokation: Reference(
Str $keyword
,
Str $identifier
,
Str $reference
)
# $keyword $identifier
[$reference][]
Invokation: Request(
@args
)
Calls "Asset"( 'Request'
, @args
)
Invokation: Request_Ref(
@args
)
Calls "Reference"( 'Request'
, @args
)
Invokation: Response(
@args
)
Calls "Asset"( 'Response'
, @args
)
Invokation: Response_Ref(
@args
)
Calls "Reference"( 'Response'
, @args
)
Invokation: Parameters(
[
Str $name
=>
HashRef $options
]*
)
For every keypair, "Parameter"($name
, %$options
) will be called
Invokation: Parameter(
Str $name
,
Str :$example
,
Bool :$required
,
Bool :$optional
,
Str :$type
,
Str :$enum
,
Str :$shortdesc
,
Str|ArrayRef[Str] :$longdesc
,
Str :$default
,
HashRef :$members
)
+ $name: `$example` ($type, $required_or_optional) - $shortdesc
$longdesc
+ Default: `$default`
+ Members
+ `$key` - $value
+ ...
Invokation: Headers(
[
Str $key
=>
Str $value
]*
)
+ Headers
$key: $value
...
Invokation: Body(
Str $body
)
+ Body
$body
Invokation: Body_CODE(
Str $code
,
Str $lang
)
+ Body
```$lang
$code
```
Invokation: Body_YAML(
AnyRef $struct
)
+ Body
```yaml
$struct
```
Invokation: Body_JSON(
AnyRef $struct
)
+ Body
```json
$struct
```
Invokation: Relation(
Str $link
)
+ Relation: $link
Please report any bugs or feature requests on the bugtracker website https://github.com/zurborg/libtext-api-blueprint-perl/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
David Zurborg zurborg@cpan.org
This software is Copyright (c) 2015 by David Zurborg.
This is free software, licensed under:
The ISC License