From 58a37b58270c23c397cf4744f7a1cff9d2fefbed Mon Sep 17 00:00:00 2001 From: Chrislearn Young Date: Fri, 2 Feb 2024 08:34:15 +0800 Subject: [PATCH] fix typo --- crates/oapi-macros/src/component.rs | 8 ++++---- crates/oapi-macros/src/feature/ext.rs | 2 +- crates/oapi-macros/src/parameter/mod.rs | 2 +- crates/oapi/docs/derive_to_response.md | 2 +- crates/oapi/docs/derive_to_responses.md | 2 +- crates/oapi/docs/endpoint.md | 2 +- crates/oapi/src/openapi/tag.rs | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/oapi-macros/src/component.rs b/crates/oapi-macros/src/component.rs index 4b93ffaf4..bdd6764c4 100644 --- a/crates/oapi-macros/src/component.rs +++ b/crates/oapi-macros/src/component.rs @@ -98,10 +98,10 @@ impl<'c> ComponentSchema { type_tree: type_tree .children .as_ref() - .expect("CompnentSchema generic container type should have children") + .expect("ComponentSchema generic container type should have children") .iter() .next() - .expect("CompnentSchema generic container type should have 1 child"), + .expect("ComponentSchema generic container type should have 1 child"), features: Some(features), description, deprecated, @@ -218,10 +218,10 @@ impl<'c> ComponentSchema { let child = type_tree .children .as_ref() - .expect("CompnentSchema Vec should have children") + .expect("ComponentSchema Vec should have children") .iter() .next() - .expect("CompnentSchema Vec should have 1 child"); + .expect("ComponentSchema Vec should have 1 child"); let unique = matches!(type_tree.generic_type, Some(GenericType::Set)); diff --git a/crates/oapi-macros/src/feature/ext.rs b/crates/oapi-macros/src/feature/ext.rs index 6ff553e5c..48bc4cb36 100644 --- a/crates/oapi-macros/src/feature/ext.rs +++ b/crates/oapi-macros/src/feature/ext.rs @@ -92,7 +92,7 @@ impl FeaturesExt for Vec { Feature::XmlAttr(xml_feature) => { let (vec_xml, value_xml) = xml_feature.split_for_vec(type_tree); - // replace the original xml attribute with splitted value xml + // replace the original xml attribute with split value xml if let Some(mut xml) = value_xml { std::mem::swap(xml_feature, &mut xml) } diff --git a/crates/oapi-macros/src/parameter/mod.rs b/crates/oapi-macros/src/parameter/mod.rs index dc5ffe7ab..b7b09237b 100644 --- a/crates/oapi-macros/src/parameter/mod.rs +++ b/crates/oapi-macros/src/parameter/mod.rs @@ -155,7 +155,7 @@ impl Parse for ValueParameter<'_> { }); } } else { - return Err(input.error("unparseable parameter name, expected literal string")); + return Err(input.error("unparsable parameter name, expected literal string")); } input.parse::()?; diff --git a/crates/oapi/docs/derive_to_response.md b/crates/oapi/docs/derive_to_response.md index 7a1b3a473..7d1ca1df9 100644 --- a/crates/oapi/docs/derive_to_response.md +++ b/crates/oapi/docs/derive_to_response.md @@ -101,7 +101,7 @@ _`ToResponse`_ can be used in four different ways to generate OpenAPI response c Content type can also be slice of **content_type** values if the endpoint support returning multiple response content types. E.g _`["application/json", "text/xml"]`_ would indicate that endpoint can return both _`json`_ and _`xml`_ formats. **The order** of the content types define the default example show first in - the Swagger UI. Swagger UI wil use the first _`content_type`_ value as a default example. + the Swagger UI. Swagger UI will use the first _`content_type`_ value as a default example. * `headers(...)` Slice of response headers that are returned back to a caller. diff --git a/crates/oapi/docs/derive_to_responses.md b/crates/oapi/docs/derive_to_responses.md index 522b6904f..5e2eee8b3 100644 --- a/crates/oapi/docs/derive_to_responses.md +++ b/crates/oapi/docs/derive_to_responses.md @@ -51,7 +51,7 @@ It can also be overridden with _`description = "..."`_ attribute. Content type can also be slice of **content_type** values if the endpoint support returning multiple response content types. E.g _`["application/json", "text/xml"]`_ would indicate that endpoint can return both _`json`_ and _`xml`_ formats. **The order** of the content types define the default example show first in - the Swagger UI. Swagger UI wil use the first _`content_type`_ value as a default example. + the Swagger UI. Swagger UI will use the first _`content_type`_ value as a default example. * `headers(...)` Slice of response headers that are returned back to a caller. diff --git a/crates/oapi/docs/endpoint.md b/crates/oapi/docs/endpoint.md index 6c9267746..2707b4403 100644 --- a/crates/oapi/docs/endpoint.md +++ b/crates/oapi/docs/endpoint.md @@ -103,7 +103,7 @@ _**Example request body definitions.**_ Content type can also be slice of **content_type** values if the endpoint support returning multiple response content types. E.g _`["application/json", "text/xml"]`_ would indicate that endpoint can return both _`json`_ and _`xml`_ formats. **The order** of the content types define the default example show first in - the Swagger UI. Swagger UI wil use the first _`content_type`_ value as a default example. + the Swagger UI. Swagger UI will use the first _`content_type`_ value as a default example. * `headers(...)` Slice of response headers that are returned back to a caller. diff --git a/crates/oapi/src/openapi/tag.rs b/crates/oapi/src/openapi/tag.rs index 2e3335491..90a738df4 100644 --- a/crates/oapi/src/openapi/tag.rs +++ b/crates/oapi/src/openapi/tag.rs @@ -66,7 +66,7 @@ impl Tag { ..Default::default() } } - /// Add name fo the tag. + /// Add name of the tag. pub fn name(mut self, name: impl Into) -> Self { self.name = name.into(); self