Skip to content

Commit

Permalink
Merge pull request #18839 from davelopez/24.1_fix_help_form_post_schema
Browse files Browse the repository at this point in the history
[24.1] Make all fields optional for HelpForumPost
  • Loading branch information
mvdbeek authored Sep 18, 2024
2 parents 43a2845 + 52f3445 commit 5e42f10
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7031,17 +7031,17 @@ export interface components {
* Avatar Template
* @description The avatar template of the user.
*/
avatar_template: string;
avatar_template: string | null;
/**
* Blurb
* @description The blurb of the post.
*/
blurb: string;
blurb: string | null;
/**
* Created At
* @description The creation date of the post.
*/
created_at: string;
created_at: string | null;
/**
* Id
* @description The ID of the post.
Expand All @@ -7051,27 +7051,27 @@ export interface components {
* Like Count
* @description The number of likes of the post.
*/
like_count: number;
like_count: number | null;
/**
* Name
* @description The name of the post.
*/
name: string;
name: string | null;
/**
* Post Number
* @description The post number of the post.
*/
post_number: number;
post_number: number | null;
/**
* Topic Id
* @description The ID of the topic of the post.
*/
topic_id: number;
topic_id: number | null;
/**
* Username
* @description The username of the post author.
*/
username: string;
username: string | null;
[key: string]: unknown | undefined;
};
/**
Expand Down
16 changes: 8 additions & 8 deletions lib/galaxy/schema/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class HelpForumPost(HelpTempBaseModel):
"""Model for a post in the help forum."""

id: Annotated[int, Field(description="The ID of the post.")]
name: Annotated[str, Field(description="The name of the post.")]
username: Annotated[str, Field(description="The username of the post author.")]
avatar_template: Annotated[str, Field(description="The avatar template of the user.")]
created_at: Annotated[str, Field(description="The creation date of the post.")]
like_count: Annotated[int, Field(description="The number of likes of the post.")]
blurb: Annotated[str, Field(description="The blurb of the post.")]
post_number: Annotated[int, Field(description="The post number of the post.")]
topic_id: Annotated[int, Field(description="The ID of the topic of the post.")]
name: Annotated[Optional[str], Field(description="The name of the post.")]
username: Annotated[Optional[str], Field(description="The username of the post author.")]
avatar_template: Annotated[Optional[str], Field(description="The avatar template of the user.")]
created_at: Annotated[Optional[str], Field(description="The creation date of the post.")]
like_count: Annotated[Optional[int], Field(description="The number of likes of the post.")]
blurb: Annotated[Optional[str], Field(description="The blurb of the post.")]
post_number: Annotated[Optional[int], Field(description="The post number of the post.")]
topic_id: Annotated[Optional[int], Field(description="The ID of the topic of the post.")]


class HelpForumTopic(Model):
Expand Down

0 comments on commit 5e42f10

Please sign in to comment.