Changelog. Update 1.1.0.md

This commit is contained in:
lganzzzo 2020-05-16 02:20:34 +03:00
parent 4b94aa771f
commit 547515744a

View File

@ -12,6 +12,7 @@ Contents:
- [Type oatpp::Any](#type-oatppany)
- [Type oatpp::Enum](#object-mapping-enum)
- [DTO - Hashcode & Equals](#dto-hashcode-and-equals)
- [DTO - Fields Annotation](#dto-fields-annotation)
## No more explicit ObjectWrapper
@ -297,3 +298,25 @@ The `DTO_HC_EQ` macro works taking into account the `DTO_HC_EQ` declared in the
If no `DTO_HC_EQ` is declared in none of the DTO's parent classes the default behavior is:
- `std::hash` - is `v_uint64` representation of object address.
- operators `==` and `!=` - is comparison of object addresses.
## DTO Fields Annotation
Now it's possible to add a description for DTO fields, which will be automatically
displayed in swagger-UI.
```cpp
class MyDto : public oatpp::Object {
DTO_INIT(MyDto, Object)
DTO_FIELD_INFO(id) {
info->description = "identifier";
}
DTO_FIELD(String, id);
};
```
*Note: The `description` is currently the only info you can add to the DTO field
(This may be extended later). In order to provide the list of possible values - use the
new Enum feature - [Type oatpp::Enum](#object-mapping-enum).*