Update README.md

This commit is contained in:
Leonid Stryzhevskyi 2018-10-15 11:49:04 +03:00 committed by GitHub
parent 63ce57cc12
commit 0b151a7af9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ Organic. Pure C++.
- **Asynchronous server (High performance. Handle 30K+ simultaneous connections)** - **Asynchronous server (High performance. Handle 30K+ simultaneous connections)**
- Multithreaded server (Simple API) - Multithreaded server (Simple API)
- Connection agnostic. (Use whatever transport. Whatever SSL backend. Whatever sockets, pipes, files. etc. It cares about HTTP stream only) - Connection agnostic. (Use whatever transport. Whatever SSL backend. Whatever sockets, pipes, files. etc. It cares about HTTP stream only)
- REST framework - REST framework (with ability to autodocument endpoints see [oatpp-swagger](https://github.com/oatpp/oatpp-swagger))
- Retrofit-like client wrapper (Use whatever request executor for example cURL, or minimalistic one provided out of the box) - Retrofit-like client wrapper (Use whatever request executor for example cURL, or minimalistic one provided out of the box)
- Object mapping (Fast object serialization-deserialization. Currently JSON, more formats comes shortly) - Object mapping (Fast object serialization-deserialization. Currently JSON, more formats comes shortly)
- Simple dependency injection framework - Simple dependency injection framework
@ -149,6 +149,20 @@ $ curl -X POST "localhost:8001/demo/api_async/json" -d '{"message": "hello json
dtoMessage: hello json post dtoMessage: hello json post
``` ```
### Swagger documentation
```c++
ENDPOINT_INFO(createUser) {
info->summary = "Create new User";
info->addConsumes<UserDto::ObjectWrapper>("application/json");
info->addResponse<UserDto::ObjectWrapper>(Status::CODE_200, "application/json");
}
ENDPOINT("POST", "demo/api/users", createUser,
BODY_DTO(UserDto::ObjectWrapper, userDto)) {
return createDtoResponse(Status::CODE_200, m_database->createUser(userDto));
}
```
## How to start ## How to start
Grab any project from [examples](https://github.com/oatpp/oatpp-examples), and follow README Grab any project from [examples](https://github.com/oatpp/oatpp-examples), and follow README