Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit b275e4c

Browse files
guptapriyamartinwicke
authored andcommitted
Policy to require public types for API
We want to require all new public APIs to have publicly documented arguments and return values.
1 parent c3d9d99 commit b275e4c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

governance/api-reviews.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ latter prevents the implementation from distinguishing between the caller not
159159
setting the argument vs. the caller setting the argument to the default value,
160160
which may be needed when the default behavior is changing.
161161

162+
#### Documented types
163+
164+
Arguments and return values to public APIs must be either be of public types, or inherit from a public type. This ensures that the arguments and return value types are documented and gives users clearer guidance on what can be passed to a public API, and what can they do with the returned values. If it is not desirable for the user to construct these types on their own, one can choose to expose superclass with no constructor, but adequate docstrings.
165+
162166
### Does it belong in TF at all?
163167

164168
As TF evolves there’s a tendency to put everything inside of it, with costs

0 commit comments

Comments
 (0)