Dancer::Plugin::SporeDefinitionControl is a Dancer plugin to control validity of route from a Spore configuration file.
SYNOPSIS
in your Dancer project, use this plugin and register:
package MyDancer::Server;
use Dancer::Plugin::SporeDefinitionControl;
check_spore_definition();
In your config file:
plugins:
SporeDefinitionControl:
spore_spec_path: path/to/route_config.yaml
The yaml path file can be relative (root project base) or absolute.
in your file path/to/route_config.yaml, put your SPORE config:
base_url: http://localhost:4500
version: 0.2
format:
- json
- xml
- yml
methods:
get_object:
required_params:
- id
- name_object
optional_params:
- created_at
path: /object/:id
method: GET
create_object:
required_params:
- name_object
optional_params:
- created_at
path: /object/create
method: POST
update_object:
required_params:
- id
- name_object
optional_params:
- created_at
path: /object/:id
method: PUT
delete_object:
required_params:
- id
- name_object
optional_params:
- created_at
path: /object/:id
method: DELETE
Product's homepage
Requirements:
· Perl