This repository has been archived by the owner on Jul 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move /validation_plan and /validation_state routes off to their own f…
…iles
- Loading branch information
1 parent
c90f582
commit 5d63aa6
Showing
12 changed files
with
244 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Conch::Controller::Validation | ||
# Conch::Controller::ValidationPlan | ||
|
||
## SOURCE | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Conch::Route::ValidationPlan | ||
|
||
## SOURCE | ||
|
||
[https://github.com/joyent/conch-api/blob/master/lib/Conch/Route/ValidationPlan.pm](https://github.com/joyent/conch-api/blob/master/lib/Conch/Route/ValidationPlan.pm) | ||
|
||
## METHODS | ||
|
||
### routes | ||
|
||
Sets up the routes for /validation\_plan. | ||
|
||
## ROUTE ENDPOINTS | ||
|
||
All routes require authentication. | ||
|
||
### `GET /validation_plan` | ||
|
||
- Controller/Action: ["get\_all" in Conch::Controller::ValidationPlan](../modules/Conch%3A%3AController%3A%3AValidationPlan#get_all) | ||
- Response: [response.json#/definitions/ValidationPlans](../json-schema/response.json#/definitions/ValidationPlans) | ||
|
||
### `GET /validation_plan/:validation_plan_id_or_name` | ||
|
||
- Controller/Action: ["get" in Conch::Controller::ValidationPlan](../modules/Conch%3A%3AController%3A%3AValidationPlan#get) | ||
- Response: [response.json#/definitions/ValidationPlan](../json-schema/response.json#/definitions/ValidationPlan) | ||
|
||
### `GET /validation_plan/:validation_plan_id_or_name/validation` | ||
|
||
- Controller/Action: ["validations" in Conch::Controller::ValidationPlan](../modules/Conch%3A%3AController%3A%3AValidationPlan#validations) | ||
- Response: [response.json#/definitions/Validations](../json-schema/response.json#/definitions/Validations) | ||
|
||
## LICENSING | ||
|
||
Copyright Joyent, Inc. | ||
|
||
This Source Code Form is subject to the terms of the Mozilla Public License, | ||
v.2.0. If a copy of the MPL was not distributed with this file, You can obtain | ||
one at [https://www.mozilla.org/en-US/MPL/2.0/](https://www.mozilla.org/en-US/MPL/2.0/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Conch::Route::ValidationState | ||
|
||
## SOURCE | ||
|
||
[https://github.com/joyent/conch-api/blob/master/lib/Conch/Route/ValidationState.pm](https://github.com/joyent/conch-api/blob/master/lib/Conch/Route/ValidationState.pm) | ||
|
||
## METHODS | ||
|
||
### routes | ||
|
||
Sets up the routes for /validation\_state. | ||
|
||
## ROUTE ENDPOINTS | ||
|
||
All routes require authentication. | ||
|
||
### `GET /validation_state/:validation_state_id` | ||
|
||
- Controller/Action: ["get" in Conch::Controller::ValidationState](../modules/Conch%3A%3AController%3A%3AValidationState#get) | ||
- Response: [response.json#/definitions/ValidationStateWithResults](../json-schema/response.json#/definitions/ValidationStateWithResults) | ||
|
||
## LICENSING | ||
|
||
Copyright Joyent, Inc. | ||
|
||
This Source Code Form is subject to the terms of the Mozilla Public License, | ||
v.2.0. If a copy of the MPL was not distributed with this file, You can obtain | ||
one at [https://www.mozilla.org/en-US/MPL/2.0/](https://www.mozilla.org/en-US/MPL/2.0/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
package Conch::Route::ValidationPlan; | ||
|
||
use Mojo::Base -strict; | ||
|
||
=pod | ||
=head1 NAME | ||
Conch::Route::ValidationPlan | ||
=head1 METHODS | ||
=head2 routes | ||
Sets up the routes for /validation_plan. | ||
=cut | ||
|
||
sub routes { | ||
my $class = shift; | ||
my $vp = shift; # secured, under /validation_plan | ||
|
||
$vp->to({ controller => 'validation_plan' }); | ||
|
||
# GET /validation_plan | ||
$vp->get('/')->to('#get_all'); | ||
|
||
{ | ||
my $with_plan = $vp->under('/:validation_plan_id_or_name')->to('#find_validation_plan'); | ||
|
||
# GET /validation_plan/:validation_plan_id_or_name | ||
$with_plan->get('/')->to('#get'); | ||
|
||
# GET /validation_plan/:validation_plan_id_or_name/validation | ||
$with_plan->get('/validation')->to('#get_validations'); | ||
} | ||
} | ||
|
||
1; | ||
__END__ | ||
=pod | ||
=head1 ROUTE ENDPOINTS | ||
All routes require authentication. | ||
=head2 C<GET /validation_plan> | ||
=over 4 | ||
=item * Controller/Action: L<Conch::Controller::ValidationPlan/get_all> | ||
=item * Response: F<response.yaml#/definitions/ValidationPlans> | ||
=back | ||
=head2 C<GET /validation_plan/:validation_plan_id_or_name> | ||
=over 4 | ||
=item * Controller/Action: L<Conch::Controller::ValidationPlan/get> | ||
=item * Response: F<response.yaml#/definitions/ValidationPlan> | ||
=back | ||
=head2 C<GET /validation_plan/:validation_plan_id_or_name/validation> | ||
=over 4 | ||
=item * Controller/Action: L<Conch::Controller::ValidationPlan/validations> | ||
=item * Response: F<response.yaml#/definitions/Validations> | ||
=back | ||
=head1 LICENSING | ||
Copyright Joyent, Inc. | ||
This Source Code Form is subject to the terms of the Mozilla Public License, | ||
v.2.0. If a copy of the MPL was not distributed with this file, You can obtain | ||
one at L<https://www.mozilla.org/en-US/MPL/2.0/>. | ||
=cut | ||
# vim: set ts=4 sts=4 sw=4 et : |
Oops, something went wrong.