From 56d404b78600fecc6364cc5f01de706f69a10a44 Mon Sep 17 00:00:00 2001 From: Josh Gramoll Date: Tue, 10 May 2022 11:45:45 -0500 Subject: [PATCH] docs: fix spelling errors --- src/openapi.rs | 14 +++++++------- utoipa-swagger-ui/src/lib.rs | 20 ++++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/openapi.rs b/src/openapi.rs index 853a1b2e..107d3171 100644 --- a/src/openapi.rs +++ b/src/openapi.rs @@ -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. @@ -91,7 +91,7 @@ builder! { #[serde(skip_serializing_if = "Option::is_none")] pub components: Option, - /// 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. /// @@ -105,7 +105,7 @@ builder! { #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option>, - /// Optional global additional documentation referece. + /// Optional global additional documentation reference. /// /// See more details at . #[serde(skip_serializing_if = "Option::is_none")] @@ -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 /// @@ -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) -> Self { set_value!(self external_docs external_docs) } @@ -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, } diff --git a/utoipa-swagger-ui/src/lib.rs b/utoipa-swagger-ui/src/lib.rs index 59806ecf..0650e1e4 100644 --- a/utoipa-swagger-ui/src/lib.rs +++ b/utoipa-swagger-ui/src/lib.rs @@ -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]: @@ -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]. //! @@ -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 //! @@ -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 @@ -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. /// @@ -501,7 +501,7 @@ impl From 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> { @@ -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 /// @@ -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 = "/";