You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "Jeremy Mitchell (JIRA)" <ji...@apache.org> on 2017/03/01 22:12:45 UTC

[jira] [Created] (TC-174) Create helper methods to return API response with level=warning|info

Jeremy Mitchell created TC-174:
----------------------------------

             Summary: Create helper methods to return API response with level=warning|info
                 Key: TC-174
                 URL: https://issues.apache.org/jira/browse/TC-174
             Project: Traffic Control
          Issue Type: Improvement
          Components: Traffic Ops, Traffic Ops API
            Reporter: Jeremy Mitchell
            Assignee: Jeremy Mitchell
            Priority: Trivial


The API has 4 levels associated with a response message:

- success (200)
- error (400)
- warning (200)
- info (200)

Helper methods exist for the first 2 (success and error):

$self->success( { "foo" => "bar" }, "Foo created successfully" );
$self->alert( "Name is required" );

but helper methods don't exist for warning and info like such:

$self->warning( "Delivery service was save but tenant was removed." );
$self->info( "Here is some info for you" );

These 2 helper methods should be easy to create and will help api developers adhere to the api guidelines: https://cwiki.apache.org/confluence/display/TC/Traffic+Ops+API+Guidelines





--
This message was sent by Atlassian JIRA
(v6.3.15#6346)