I am currently using Swagger and I want to make it so I have 2 parameters From, To, and then they would inherit Coordinate
export class Coordinate {
@ApiProperty({ type: Number })
lat: number;
@ApiProperty({ type: Number })
lon: number;
}
export class From extends Coordinate {}
export class To extends Coordinate {}
This creates lat and lon, however in the request they would appear as same. Is that possible to do what I want to do without repeating the same code for From and To? As I will be using Coordinate in other places as well.