Skip to content

Commit

Permalink
Fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rlebran committed Jun 27, 2024
1 parent 0f27539 commit aec42d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apistos-core/src/webhook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use apistos_models::OpenApiVersion;
#[derive(Clone, Debug, Default)]
pub struct ApiWebhookDef {
pub components: Vec<Components>,
pub webhooks: BTreeMap<String, ReferenceOr<PathItem>>
pub webhooks: BTreeMap<String, ReferenceOr<PathItem>>,
}

pub trait ApiWebhook {
Expand Down
8 changes: 6 additions & 2 deletions apistos/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ use once_cell::sync::Lazy;
use regex::Regex;

use apistos_core::{ApiWebhook, ApiWebhookDef};
use apistos_models::components::Components;
use apistos_models::paths::{OperationType, Parameter, PathItem};
use apistos_models::reference_or::ReferenceOr;
use apistos_models::{ApistosSchema, OpenApi, OpenApiVersion};
use apistos_models::components::Components;
use apistos_plugins::ui::{UIPluginConfig, UIPluginWrapper};

use crate::internal::actix::handler::OASHandler;
Expand Down Expand Up @@ -277,7 +277,11 @@ where
}

#[allow(clippy::unwrap_used)]
fn register_webhook_components(self, components: Vec<Components>, webhooks: BTreeMap<String, ReferenceOr<PathItem>>) -> Self {
fn register_webhook_components(
self,
components: Vec<Components>,
webhooks: BTreeMap<String, ReferenceOr<PathItem>>,
) -> Self {
let oas_version = get_oas_version();
if matches!(oas_version, OpenApiVersion::OAS3_0) {
return self;
Expand Down

0 comments on commit aec42d4

Please sign in to comment.