Skip to content

Commit

Permalink
Merge pull request #78 from chriskd/misc-validation-fixes
Browse files Browse the repository at this point in the history
Schema updates to correct validation errors
  • Loading branch information
fa0311 authored Nov 14, 2024
2 parents 6d44ef0 + 42a5a20 commit 408fd99
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions src/openapi/schemas/tweet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ components:
$ref: "#/components/schemas/Community"
role:
type: string
enum: [Member, Moderator]
enum: [Member, Moderator, Admin]
user_results:
$ref: "user.yaml#/components/schemas/UserResults"

Expand Down Expand Up @@ -488,10 +488,10 @@ components:
$ref: "#/components/schemas/CommunityJoinRequestsResult"
join_policy:
type: string
enum: [Open]
enum: [Open, RestrictedJoinRequestsRequireModeratorApproval]
invites_policy:
type: string
enum: [MemberInvitesAllowed]
enum: [MemberInvitesAllowed, ModeratorInvitesAllowed]
is_pinned:
type: boolean
members_facepile_results:
Expand Down Expand Up @@ -649,11 +649,7 @@ components:
BirdwatchPivot:
required:
- "destinationUrl"
- "footer"
- "note"
- "subtitle"
- "title"
- "shorttitle"
- "iconType"
properties:
destinationUrl:
Expand All @@ -671,7 +667,7 @@ components:
type: string
visualStyle:
type: string
enum: [Default]
enum: [Default, Tentative]
iconType:
type: string
enum: [BirdwatchV1Icon]
Expand Down Expand Up @@ -968,6 +964,7 @@ components:
- "stale_tweet"
- "community_tweet_non_member_public_community"
- "community_tweet_non_member_closed_community"
- "blocked_viewer"
place:
additionalProperties: true # todo

Expand Down
1 change: 1 addition & 0 deletions src/openapi/schemas/typename.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ components:
Community,
CommunityDeleteActionUnavailable,
CommunityJoinAction,
CommunityJoinActionUnavailable,
CommunityLeaveActionUnavailable,
CommunityTweetPinActionUnavailable,
CommunityTweetUnpinActionUnavailable,
Expand Down
1 change: 0 additions & 1 deletion src/openapi/schemas/user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ components:
required:
- "description"
- "verified_since_msec"
- "override_verified_year"
properties:
description:
$ref: "#/components/schemas/UserVerificationInfoReasonDescription"
Expand Down

0 comments on commit 408fd99

Please sign in to comment.