oag_core/parse/
components.rs1use indexmap::IndexMap;
2use serde::{Deserialize, Serialize};
3
4use super::parameter::ParameterOrRef;
5use super::request_body::RequestBodyOrRef;
6use super::response::ResponseOrRef;
7use super::schema::SchemaOrRef;
8use super::security::SecurityScheme;
9
10#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
12pub struct Components {
13 #[serde(default, skip_serializing_if = "IndexMap::is_empty")]
14 pub schemas: IndexMap<String, SchemaOrRef>,
15
16 #[serde(default, skip_serializing_if = "IndexMap::is_empty")]
17 pub responses: IndexMap<String, ResponseOrRef>,
18
19 #[serde(default, skip_serializing_if = "IndexMap::is_empty")]
20 pub parameters: IndexMap<String, ParameterOrRef>,
21
22 #[serde(
23 rename = "requestBodies",
24 default,
25 skip_serializing_if = "IndexMap::is_empty"
26 )]
27 pub request_bodies: IndexMap<String, RequestBodyOrRef>,
28
29 #[serde(
30 rename = "securitySchemes",
31 default,
32 skip_serializing_if = "IndexMap::is_empty"
33 )]
34 pub security_schemes: IndexMap<String, SecurityScheme>,
35}