Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudogu/conveyor
Generate dtos from annotations
https://github.com/cloudogu/conveyor
annotation-processor dto hal java mapping rest-api
Last synced: about 2 months ago
JSON representation
Generate dtos from annotations
- Host: GitHub
- URL: https://github.com/cloudogu/conveyor
- Owner: cloudogu
- License: mit
- Created: 2021-05-02T19:59:52.000Z (over 3 years ago)
- Default Branch: develop
- Last Pushed: 2021-10-12T14:38:17.000Z (about 3 years ago)
- Last Synced: 2024-04-13T22:48:01.968Z (9 months ago)
- Topics: annotation-processor, dto, hal, java, mapping, rest-api
- Language: Java
- Homepage:
- Size: 106 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Conveyor
Generate dtos from annotations.
## Why?
There are a lot of dto mapping libraries out there, so why create another one?
Conveyor was created to support the special needs of [SCM-Manager](https://scm-manager.org).
For [SCM-Manager](https://scm-manager.org) we wanted a library which support the following features:* Simple to use
* As little boilerplate code as possible
* Support of _links and _embedded of [HAL](https://stateless.group/hal_specification.html)
* Support views to keep our OpenAPI documentation clean
* Copy annotations from source entitySo we decided to create another dto mapping library.
## Usage
```java
@GenerateDto
public class Person {@Include
private String firstName;
@Include
private String lastName;
// constructor, getter and setter
}
```Conveyor will automatically create a `PersonDto` class, which can be used as follows:
```java
Person person = new Person("Tricia", "McMillan");Links links = Links.linkingTo()
.self("/people/trillian")
.build();PersonDto dto = PersonDto.from(person, links);
```## Installation
Get the latest stable version from [![Maven Central](https://img.shields.io/maven-central/v/com.cloudogu.conveyor/conveyor.svg)](https://search.maven.org/search?q=g:com.cloudogu.conveyor%20a:conveyor)
### Gradle
```groovy
implementation 'de.otto.edison:edison-hal:2.1.0'
compileOnly 'com.cloudogu.conveyor:conveyor:x.y.z'
annotationProcessor 'com.cloudogu.conveyor:conveyor:x.y.z'
```### Maven
```xml
de.otto.edison
edison-hal
2.1.0com.cloudogu.conveyor
conveyor
x.y.z
true```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details