Skip to content

Commit 58bda3a

Browse files
authored
Update README.md
1 parent bf2515c commit 58bda3a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
## Features
9-
- lightweight, less then 3000 line codes (framework + built-in route/fake data generating)
9+
- lightweight, less than 3000 line codes (framework + built-in route/fake data generating)
1010
- based on `form-binder-java`, allowing dynamic objects in operation's parameter/response definitions
1111
- directly integrate with `swagger-models`, allowing to operate swagger object when necessary
1212
- can generate mock response w/ fake data on demand for unimplemented api operations
@@ -50,16 +50,17 @@ static Mapping<?> pet = $(mapping(
5050
static SharingHolder sharing = sharing().pathPrefix("/pet").tag("pet");
5151

5252
static {
53-
sharing.operation(GET, "/:petId<[0-9]+>")
53+
sharing.operation(GET, "/{petId}")
5454
.summary("get pet by id")
5555
.parameter(param(longv()).in("path").name("petId").example(1l))
5656
.response(200, response(pet))
5757
.response(404, response().description("pet not found"))
5858
.notImplemented() // MARK IT `notImplemented`, THEN `binder-swagger-java` WILL GENERATE MOCK RESPONSE FOR YOU
5959
;
6060
}
61-
@POST
62-
public Response addPet(String data) throws BadRequestException, SQLException {
61+
@GET
62+
@Path("/{petId}")
63+
public Response getPetById(@PathParam("petId") String petId) throws NotFoundException, SQLException {
6364
...
6465
```
6566
#### 2) supplement your other swagger info:

0 commit comments

Comments
 (0)