ocket8888 commented on a change in pull request #4079: Rewrote /federation_resolvers - POST URL: https://github.com/apache/trafficcontrol/pull/4079#discussion_r343739082
########## File path: docs/source/api/federation_resolvers.rst ########## @@ -30,65 +111,57 @@ Creates a new federation resolver. Request Structure ----------------- :ipAddress: The IP address of the resolver - may be IPv4 or IPv6 -:typeId: The integral, unique identifier of the type of resolver being created - will *represent* one of: +:typeId: The integral, unique identifier of the :term:`Type` of resolver being created - RESOLVE4 - Resolver is for IPv4 addresses and ``ipAddress`` is IPv4 - RESOLVE6 - Resolver is for IPv6 addresses and ``ipAddress`` is IPv6 + .. caution:: This field should only ever be an identifier for one of the :term:`Types` "RESOLVE4" or "RESOLVE6", but there is **no protection for this built into Traffic Ops** and therefore **any valid** :term:`Type` **identifier will be silently accepted by Traffic Ops** and so care should be taken to ensure that these :term:`Types` are properly identified. If any :term:`Type` besides "RESOLVE4" or "RESOLVE6" is identified, the resulting resolver *will* **not** *work*. Review comment: :man_shrugging: I sort of wanted to, but it's been said that we should: > _"... lean towards resisting the temptation during the perl -> go rewrites to change how things work as much as possible; even if it's wrong. That way if something goes wrong unexpectedly, it's easier to determine which was the cause."_ Restricting the allowed values of `typeId` would be a breaking change so... ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services