Skip to content

Commit d1d282f

Browse files
authored
Added API Reference convention and naming convention for tests (#3321)
* Added api reference convention and naming convention for tests * Fix formatting * update formating
1 parent e320d12 commit d1d282f

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

docs/design/APIReference.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**Design:** Convention, **Status:** [Accepted](README.md)
2+
3+
## API Reference
4+
5+
This page describes a general guideline for API Reference
6+
7+
- Public APIs MUST have Javadocs, and the documentation MUST be properly formatted following [Javadoc format](https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html)
8+
- Public Javadocs for high level libraries such as DyanmoDB Enhanced Client or hand-written utilitiy mehods MUST have code snippets as part of Javadocs

docs/design/NamingConventions.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ This page describes the naming conventions, nouns and common terms
3434
* Note: If only the only implementation uses async HTTP, `Async` may be excluded. (e.g. `S3TransferManager`)
3535
* If the class does not make service calls:
3636
* If the class creates presigned URLs: `{ServiceName}Presigner` (e.g. `S3Presigner`)
37-
* If the class is a collection of various unrelated "helper" methods: `{ServiceName}Utilities` (e.g. `S3Utilities`)
37+
* If the class is a collection of various unrelated "helper" methods: `{ServiceName}Utilities` (e.g. `S3Utilities`)
38+
39+
### Tests Naming
40+
41+
Test names SHOULD follow `methodToTest_when_expectedBehavior` (e.g. `close_withCustomExecutor_shouldNotCloseCustomExecutor`, `uploadDirectory_withDelimiter_filesSentCorrectly`)

docs/design/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ None
6262
[java.util.Optional](https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html).
6363
* [Completable Future Usage](UseOfCompletableFuture.md) - Conventions
6464
governing the use of
65-
[java.util.concurrent.CompletableFuture](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html).
65+
* [java.util.concurrent.CompletableFuture](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html).
66+
* [APIReference](APIReference.md) - Conventions used for API references
6667

6768
**Rejected**
6869

0 commit comments

Comments
 (0)