-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
started to reorganize the structure of the open_api
- Loading branch information
Showing
5 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)] | ||
pub struct ExternalDocs { | ||
pub description: Option<String>, | ||
pub url: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
mod info; | ||
mod server; | ||
mod paths; | ||
mod paths; | ||
mod open_api; | ||
mod security; | ||
mod external_docs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use std::collections::HashMap; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Debug, Clone, Serialize, Deserialize, Default)] | ||
pub struct OpenAPI { | ||
pub openapi: String, | ||
pub info: crate::new_oas::info::Info, | ||
#[serde(rename = "jsonSchemaDialect")] | ||
pub json_schema_dialect: Option<String>, | ||
pub servers: Option<Vec<crate::new_oas::server::Server>>, | ||
pub paths: Option<crate::new_oas::paths::Paths>, | ||
pub webhooks: Option<HashMap<String,RelRef>>, | ||
pub components: Option<crate::new_oas::components::Components>, | ||
pub security: Option<Vec<crate::new_oas::security::Security>>, | ||
pub tags: Option<Vec<crate::new_oas::tags::Tag>>, | ||
pub external_docs: Option<crate::new_oas::external_docs::ExternalDocs>, | ||
pub extensions: Option<HashMap<String, serde_json::Value>>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use std::collections::HashMap; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)] | ||
pub struct Security { | ||
pub security: Option<HashMap<String, Vec<String>>>, | ||
} |