File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 6
6
7
7
8
8
## 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)
10
10
- based on ` form-binder-java ` , allowing dynamic objects in operation's parameter/response definitions
11
11
- directly integrate with ` swagger-models ` , allowing to operate swagger object when necessary
12
12
- can generate mock response w/ fake data on demand for unimplemented api operations
@@ -50,16 +50,17 @@ static Mapping<?> pet = $(mapping(
50
50
static SharingHolder sharing = sharing(). pathPrefix(" /pet" ). tag(" pet" );
51
51
52
52
static {
53
- sharing. operation(GET , " /: petId<[0-9]+> " )
53
+ sharing. operation(GET , " /{ petId} " )
54
54
.summary(" get pet by id" )
55
55
.parameter(param(longv()). in(" path" ). name(" petId" ). example(1l ))
56
56
.response(200 , response(pet))
57
57
.response(404 , response(). description(" pet not found" ))
58
58
.notImplemented() // MARK IT `notImplemented`, THEN `binder-swagger-java` WILL GENERATE MOCK RESPONSE FOR YOU
59
59
;
60
60
}
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 {
63
64
...
64
65
```
65
66
#### 2 ) supplement your other swagger info:
You can’t perform that action at this time.
0 commit comments