-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Motivating example with OmitReadOnly and OmitWriteOnly:
export interface PetsApiInterface {
addPet(params: {
pathParams: { storeId: string };
petDto?: OmitReadOnly<PetDto>;
}): Promise<void>;
listPets(params: {
pathParams: { storeId: string };
queryParams?: { status?: Array<string>, tags?: Array<string>, bornAfter?: Date, };
}): Promise<OmitWriteOnly<PetDto>>;
}OmitReadOnly can be created using https://stackoverflow.com/a/49579497/27658. Alternatively, OmitWriteOnly<PetDto> = Omit<PetDto, "foo" | "bar" | "baz"> can be generated (but the LHS syntax is probably to possible).
If this is done, the test data generator must also be updated to support Full, Input, Output (and perhaps MinimalOutput and MinimalInput) variants as well.
Metadata
Metadata
Assignees
Labels
No labels