Skip to content

Commit 2717160

Browse files
committed
#45 - Update javadoc in API using {} style path expressions
1 parent 84230a0 commit 2717160

File tree

7 files changed

+35
-5
lines changed

7 files changed

+35
-5
lines changed

http-api/src/main/java/io/avaje/http/api/Default.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* <pre>{@code
1616
*
17-
* @Get("/forCustomer/:custId")
17+
* @Get("/forCustomer/{custId}")
1818
* public List<Contact> getContacts(UUID custId, @Default("name") String orderBy) {
1919
* ...
2020
* }

http-api/src/main/java/io/avaje/http/api/Delete.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* <pre>{@code
1313
*
14-
* @Delete(":id")
14+
* @Delete("{id}")
1515
* void delete(long id) {
1616
*
1717
* ...

http-api/src/main/java/io/avaje/http/api/Get.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* <pre>{@code
1313
*
14-
* @Get(":id")
14+
* @Get("{id}")
1515
* Customer get(long id) {
1616
*
1717
* ...
@@ -30,7 +30,7 @@
3030
*
3131
* <pre>{@code
3232
*
33-
* @Get("/status/:status")
33+
* @Get("/status/{status}")
3434
* List<Customer> getByStatus(String status, LocalDate since) {
3535
*
3636
* ...
@@ -41,7 +41,7 @@
4141
* <h4>Example - Multiple path parameters</h4>
4242
* <pre>{@code
4343
*
44-
* @Get("/status/:status/:parentId")
44+
* @Get("/status/{status}/{parentId}")
4545
* List<Customer> getByStatus(String status, long parentId, LocalDate since) {
4646
*
4747
* ...

http-api/src/main/java/io/avaje/http/api/HttpMethod.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import java.lang.annotation.RetentionPolicy;
66
import java.lang.annotation.Target;
77

8+
/**
9+
* Base for Http verb based annotations.
10+
*/
811
@Target(value= ElementType.ANNOTATION_TYPE)
912
@Retention(value= RetentionPolicy.RUNTIME)
1013
public @interface HttpMethod {

http-api/src/main/java/io/avaje/http/api/InvalidPathArgumentException.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,23 @@
55
*/
66
public class InvalidPathArgumentException extends InvalidTypeArgumentException {
77

8+
/**
9+
* Construct with a message.
10+
*/
811
public InvalidPathArgumentException(String message) {
912
super(message);
1013
}
1114

15+
/**
16+
* Construct with an exception.
17+
*/
1218
public InvalidPathArgumentException(Exception e) {
1319
super(e);
1420
}
1521

22+
/**
23+
* Construct with message and exception.
24+
*/
1625
public InvalidPathArgumentException(String message, Exception e) {
1726
super(message, e);
1827
}

http-api/src/main/java/io/avaje/http/api/InvalidTypeArgumentException.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,23 @@
55
*/
66
public class InvalidTypeArgumentException extends IllegalArgumentException {
77

8+
/**
9+
* Construct with a message.
10+
*/
811
public InvalidTypeArgumentException(String message) {
912
super(message);
1013
}
1114

15+
/**
16+
* Construct with an exception.
17+
*/
1218
public InvalidTypeArgumentException(Exception e) {
1319
super(e);
1420
}
1521

22+
/**
23+
* Construct with a message and exception.
24+
*/
1625
public InvalidTypeArgumentException(String message, Exception e) {
1726
super(message, e);
1827
}

http-api/src/main/java/io/avaje/http/api/RequiredArgumentException.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,24 @@ public class RequiredArgumentException extends IllegalArgumentException {
1111

1212
private String property;
1313

14+
/**
15+
* Construct with a message and property.
16+
*/
1417
public RequiredArgumentException(String message, String property) {
1518
super(message);
1619
this.property = property;
1720
}
1821

22+
/**
23+
* Construct with an exception.
24+
*/
1925
public RequiredArgumentException(Exception e) {
2026
super(e);
2127
}
2228

29+
/**
30+
* Construct with a message and exception.
31+
*/
2332
public RequiredArgumentException(String message, Exception e) {
2433
super(message, e);
2534
}

0 commit comments

Comments
 (0)