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

docs: fix spelling errors #135

Merged
merged 1 commit into from
May 10, 2022
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
14 changes: 7 additions & 7 deletions src/openapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ builder! {
#[cfg_attr(feature = "debug", derive(Debug))]
#[serde(rename_all = "camelCase")]
pub struct OpenApi {
/// OpenAPI document verison.
/// OpenAPI document version.
pub openapi: OpenApiVersion,

/// Provides metadata about the API.
Expand Down Expand Up @@ -91,7 +91,7 @@ builder! {
#[serde(skip_serializing_if = "Option::is_none")]
pub components: Option<Components>,

/// Declaration of global security mechanishms that can be used accros the API. The individual operaitons
/// Declaration of global security mechanisms that can be used across the API. The individual operations
/// can override the declarations. You can use `SecurityRequirement::default()` if you wish to make security
/// optional by adding it to the list of securities.
///
Expand All @@ -105,7 +105,7 @@ builder! {
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,

/// Optional global additional documentation referece.
/// Optional global additional documentation reference.
///
/// See more details at <https://spec.openapis.org/oas/latest.html#external-documentation-object>.
#[serde(skip_serializing_if = "Option::is_none")]
Expand All @@ -116,8 +116,8 @@ builder! {
impl OpenApi {
/// Construct a new [`OpenApi`] object.
///
/// Function accepts two arguments one whichs is [`Info`] metadata of the API; two which is [`Paths`]
/// containging operations for the API.
/// Function accepts two arguments one which is [`Info`] metadata of the API; two which is [`Paths`]
/// containing operations for the API.
///
/// # Examples
///
Expand Down Expand Up @@ -193,7 +193,7 @@ impl OpenApiBuilder {
set_value!(self tags tags.map(|tags| tags.into_iter().collect()))
}

/// Add [`ExternalDocs`] for refering additional documentation.
/// Add [`ExternalDocs`] for referring additional documentation.
pub fn external_docs(mut self, external_docs: Option<ExternalDocs>) -> Self {
set_value!(self external_docs external_docs)
}
Expand All @@ -205,7 +205,7 @@ impl OpenApiBuilder {
#[derive(Serialize, Deserialize, Clone)]
#[cfg_attr(feature = "debug", derive(Debug))]
pub enum OpenApiVersion {
/// Will serialize to `3.0.3` the latest from 3.0 serie.
/// Will serialize to `3.0.3` the latest from 3.0 serde.
#[serde(rename = "3.0.3")]
Version3,
}
Expand Down
20 changes: 10 additions & 10 deletions utoipa-swagger-ui/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! This crate implements necessary boiler plate code to serve Swagger UI via web server. It
//! works as a bridge for serving the OpenAPI documetation created with [`utoipa`][utoipa] libarary in the
//! works as a bridge for serving the OpenAPI documentation created with [`utoipa`][utoipa] library in the
//! Swagger UI.
//!
//! [utoipa]: <https://docs.rs/utoipa/>
Expand All @@ -9,7 +9,7 @@
//! * **actix-web** `version >= 4`
//! * **rocket** `version >=0.5.0-rc.1`
//!
//! Serving Swagger UI is framework independant thus this crate also supports serving the Swagger UI with
//! Serving Swagger UI is framework independent thus this crate also supports serving the Swagger UI with
//! other frameworks as well. With other frameworks there is bit more manual implementation to be done. See
//! more details at [`serve`] or [`examples`][examples].
//!
Expand All @@ -18,9 +18,9 @@
//! # Features
//!
//! * **actix-web** Enables actix-web integration with pre-configured SwaggerUI service factory allowing
//! users to use the Swagger UI without a hazzle.
//! users to use the Swagger UI without a hassle.
//! * **rocket** Enables rocket integration with with pre-configured routes for serving the Swagger UI
//! and api doc without a hazzle.
//! and api doc without a hassle.
//!
//! # Install
//!
Expand Down Expand Up @@ -188,7 +188,7 @@ impl SwaggerUi {
///
/// Takes one [`Vec`] argument containing tuples of [`Url`] and [`OpenApi`].
///
/// Situations where this comes handy is when there is a need or wish to seprate different parts
/// Situations where this comes handy is when there is a need or wish to separate different parts
/// of the api to separate api docs.
///
/// # Examples
Expand Down Expand Up @@ -361,7 +361,7 @@ impl<'a> Url<'a> {

/// Create new [`Url`] with primary flag.
///
/// Primary flag allows users to override the default behaviour of the Swagger UI for selecting the primary
/// Primary flag allows users to override the default behavior of the Swagger UI for selecting the primary
/// doc to display. By default when there are multiple docs in Swagger UI the first one in the list
/// will be the primary.
///
Expand Down Expand Up @@ -501,7 +501,7 @@ impl From<String> for Config<'_> {
}
}

/// Represents servealbe file of Swagger UI. This is used together with [`serve`] function
/// Represents servable file of Swagger UI. This is used together with [`serve`] function
/// to serve Swagger UI files via web server.
#[non_exhaustive]
pub struct SwaggerFile<'a> {
Expand All @@ -517,13 +517,13 @@ pub struct SwaggerFile<'a> {
/// * **config** Swagger [`Config`] to use for the Swagger UI. Currently supported configuration
/// options are managing [`Url`]s.
///
/// Typpically this function is implemented _**within**_ handler what handles _**GET**_ operations related to the
/// Typically this function is implemented _**within**_ handler what handles _**GET**_ operations related to the
/// Swagger UI. Handler itself must match to user defined path that points to the root of the Swagger UI and
/// matches everything relatively from the root of the Swagger UI. The relative path from root of the Swagger UI
/// must be taken to `tail` path variable which is used to serve [`SwaggerFile`]s. If Swagger UI
/// is served from path `/swagger-ui/` then the `tail` is everything under the `/swagger-ui/` prefix.
///
/// _There are also implementations in [examples of utoipa repoistory][examples]._
/// _There are also implementations in [examples of utoipa repository][examples]._
///
/// [examples]: https://github.com/juhaku/utoipa/tree/master/examples
///
Expand All @@ -537,7 +537,7 @@ pub struct SwaggerFile<'a> {
/// // The config should be created in main function or in initialization before
/// // creation of the handler which will handle serving the Swagger UI.
/// let config = Arc::new(Config::from("/api-doc.json"));
/// // This "/" is for demostrative purposes only. The actual path should point to
/// // This "/" is for demonstrative purposes only. The actual path should point to
/// // file within Swagger UI. In real implementation this is the `tail` path from root of the
/// // Swagger UI to the file served.
/// let path = "/";
Expand Down