openapi_model_generator/
models.rs1use serde::{Serialize, Deserialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4pub struct Model {
5 pub name: String,
6 pub fields: Vec<Field>,
7}
8
9#[derive(Debug, Clone, Serialize, Deserialize)]
10pub struct Field {
11 pub name: String,
12 pub field_type: String,
13 pub is_required: bool,
14}
15
16#[derive(Debug, Clone, Serialize, Deserialize)]
17pub struct RequestModel {
18 pub name: String,
19 pub content_type: String,
20 pub schema: String,
21 pub is_required: bool,
22}
23
24#[derive(Debug, Clone, Serialize, Deserialize)]
25pub struct ResponseModel {
26 pub name: String,
27 pub status_code: String,
28 pub content_type: String,
29 pub schema: String,
30 pub description: Option<String>,
31}