Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn committed Feb 2, 2024
1 parent e3aea2e commit 58a37b5
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions crates/oapi-macros/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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));

Expand Down
2 changes: 1 addition & 1 deletion crates/oapi-macros/src/feature/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl FeaturesExt for Vec<Feature> {
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)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/oapi-macros/src/parameter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Token![,]>()?;
Expand Down
2 changes: 1 addition & 1 deletion crates/oapi/docs/derive_to_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion crates/oapi/docs/derive_to_responses.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion crates/oapi/docs/endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion crates/oapi/src/openapi/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) -> Self {
self.name = name.into();
self
Expand Down

0 comments on commit 58a37b5

Please sign in to comment.