ls1intum / Hephaestus

Hephaestus - A Generative AI Mentor for Agile Software Development
MIT License
7 stars 1 forks source link

Too many undefined values in API client #70

Open FelixTJDietrich opened 1 month ago

FelixTJDietrich commented 1 month ago

Current

A lot or all fields are marked with ? stating that they could be undefined even though the aren't:

export interface PullRequestDTO { 
    id?: number;
    title?: string;
    url?: string;
    state?: PullRequestDTO.StateEnum;
    createdAt?: string;
    updatedAt?: string;
    mergedAt?: string;
    author?: UserDTO;
    comments?: Set<IssueCommentDTO>;
    repository?: RepositoryDTO;
}
export namespace PullRequestDTO {
    export type StateEnum = 'CLOSED' | 'OPEN';
    export const StateEnum = {
        Closed: 'CLOSED' as StateEnum,
        Open: 'OPEN' as StateEnum
    };
}

Expected

Most of the fields are actually defined and therefore should not be optional in the OpenAPI specs