mapstruct / mapstruct/mapstruct
Retrieve mappings programmatically
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 7.7k
- Fork
- 1.1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hi,
is there any way to retrieve mappings via API? It would be nice to know what property of type A becomes what property of type B. I'll try to clarify the request using an example: mapping a filter or sort clause from DTO to DO. Consider for instance
@Mapping(source = "numberOfSeats", target = "seatCount")
CarDto carToDto(Car car);
@InheritInverseConfiguration
Car carDtoToCar(CarDto carDto);
Suppose the UI has a toggle to filter the car based on the number of seats: CarDTO is filtered on seatCount property while Car is filtered on numberOfSeats. I'd like to have a way to retrieve this information in order to convert Filter/Sort objects between frontend and backend. Is there any way I can achieve this with the existing APIs?
Thank you,
lorenzo
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Nell’issue non sono identificati file, test o punti di ingresso. Inizia esaminando le API MapStruct esistenti e il modo in cui sono rappresentati i metadati di mapping dell’esempio; il lavoro è completato quando esiste un modo definito e supportato per recuperare i mappings necessari a convertire le proprietà di filtro o ordinamento tra oggetti DTO e di dominio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- api, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100