Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve openapi document #544

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 0 additions & 134 deletions crates/oapi/README.md

This file was deleted.

4 changes: 2 additions & 2 deletions crates/oapi/src/endpoint.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//! endpoint module

use std::any::TypeId;

use salvo_core::http::StatusCode;
Expand All @@ -8,6 +6,8 @@ use salvo_core::{prelude::StatusError, writing};
use crate::{Components, Operation, Response, ToResponse, ToResponses, ToSchema};

/// Represents an endpoint.
///
/// View [module level documentation](index.html) for more details.
pub struct Endpoint {
/// The operation information of the endpoint.
pub operation: Operation,
Expand Down
2 changes: 1 addition & 1 deletion crates/oapi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mod cfg;
mod openapi;
pub use openapi::*;

#[doc = include_str!("../docs/endpoint.md")]
pub mod endpoint;
pub use endpoint::{Endpoint, EndpointArgRegister, EndpointOutRegister, EndpointRegistry};
pub mod extract;
Expand All @@ -36,7 +37,6 @@ cfg_feature! {
pub mod redoc;
}

#[doc = include_str!("../docs/endpoint.md")]
pub use salvo_oapi_macros::endpoint;
pub(crate) use salvo_oapi_macros::schema;
#[doc = include_str!("../docs/derive_to_parameters.md")]
Expand Down
Loading