apache / trafficcontrol

Apache Traffic Control is an Open Source implementation of a Content Delivery Network
https://trafficcontrol.apache.org/
Apache License 2.0
1.08k stars 344 forks source link

[TC-283] traffic ops api (PUT api/.../server/...) doc inconsistent with code #929

Closed limited closed 6 years ago

limited commented 7 years ago

The Traffic Ops API documentation for "PUT /api/1.2/servers/{:id}" shows that "type" is a required field. It's actually "type_id". I think that's true for all the fields representing foreign keys.

Documentation is here: http://trafficcontrol.incubator.apache.org/docs/latest/development/traffic_ops_api/v12/server.html

Code is here: https://github.com/apache/incubator-trafficcontrol/blob/master/traffic_ops/app/lib/API/Server.pm#L201

Author: Dan Kirkwood JIRA Link: https://issues.apache.org/jira/browse/TC-283 Found Version: 2.1.0

dangogh commented 6 years ago

I see in current docs that it correctly shows typeId (not type_id) as the field name