Skip to content

Commit 5f33336

Browse files
drew-harrisskeptrunedev
authored andcommitted
fix: add get invitations to openapi spec
1 parent e13e77c commit 5f33336

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

server/src/data/models.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2669,7 +2669,16 @@ impl Organization {
26692669
}
26702670
}
26712671

2672-
#[derive(Debug, Serialize, Deserialize, Queryable, Insertable, ValidGrouping)]
2672+
#[derive(Debug, Serialize, Deserialize, Queryable, Insertable, ValidGrouping, ToSchema)]
2673+
#[schema(example = json!({
2674+
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
2675+
"email": "[email protected]",
2676+
"organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
2677+
"used": false,
2678+
"created_at": "2021-01-01 00:00:00.000",
2679+
"updated_at": "2021-01-01 00:00:00.000",
2680+
"role": 1,
2681+
}))]
26732682
#[diesel(table_name = invitations)]
26742683
pub struct Invitation {
26752684
pub id: uuid::Uuid,

server/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ impl Modify for SecurityAddon {
151151
modifiers(&SecurityAddon),
152152
paths(
153153
handlers::invitation_handler::post_invitation,
154+
handlers::invitation_handler::get_invitations,
154155
handlers::auth_handler::login,
155156
handlers::auth_handler::logout,
156157
handlers::auth_handler::get_me,
@@ -458,6 +459,7 @@ impl Modify for SecurityAddon {
458459
data::models::ConditionType,
459460
data::models::HasIDCondition,
460461
data::models::DistanceMetric,
462+
data::models::Invitation,
461463
errors::ErrorResponseBody,
462464
middleware::api_version::APIVersion,
463465
)

0 commit comments

Comments
 (0)