[
https://issues.apache.org/jira/browse/TC-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ryan Durfey updated TC-174:
---------------------------
Labels: api_endpoints helper_methods (was: )
> 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
> Labels: api_endpoints, helper_methods
>
> 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.4.14#64029)