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

Fix typos in various generators, templates #20389

Merged
merged 2 commits into from
Dec 30, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ private void flattenComponentResponses() {
* breed:
* type: string
*
* @param key a unique name ofr the composed schema.
* @param key a unique name for the composed schema.
* @param children the list of nested schemas within a composed schema (allOf, anyOf, oneOf).
* @param skipAllOfInlineSchemas true if allOf inline schemas need to be skipped.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ private static String queryArgs(final CodegenOperation op) {
* <p>
* The data variant can have nulls and other non-scala things, but they know how to create validated model objects.
* <p>
* This 'asScalaDataType' is used to ensure the type hierarchy is correct for both the model and data varients.
* This 'asScalaDataType' is used to ensure the type hierarchy is correct for both the model and data variants.
* <p>
* e.g. consider this example:
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ private Set<String> reformatProvideArgsParams(Operation operation) {
if (argObj instanceof List) {
List<String> provideArgs = (List<String>) argObj;
if (!provideArgs.isEmpty()) {
List<String> formatedArgs = new ArrayList<>();
List<String> formattedArgs = new ArrayList<>();
for (String oneArg : provideArgs) {
if (StringUtils.isNotEmpty(oneArg)) {
String regexp = "(?<AnnotationTag>@)?(?<ClassPath>(?<PackageName>(\\w+\\.)*)(?<ClassName>\\w+))(?<Params>\\(.*?\\))?\\s?";
Expand All @@ -1095,10 +1095,10 @@ private Set<String> reformatProvideArgsParams(Operation operation) {
}
String newArg = String.join(" ", newArgs);
LOGGER.trace("new arg {} {}", newArg);
formatedArgs.add(newArg);
formattedArgs.add(newArg);
}
}
operation.getExtensions().put("x-spring-provide-args", formatedArgs);
operation.getExtensions().put("x-spring-provide-args", formattedArgs);
}
}
return provideArgsClassSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ web::json::value ModelBase::toJson( const std::vector<T>& value )
template<typename T>
web::json::value ModelBase::toJson( const std::set<T>& value )
{
// There's no protoype web::json::value::array(...) taking a std::set parameter. Converting to std::vector to get an array.
// There's no prototype web::json::value::array(...) taking a std::set parameter. Converting to std::vector to get an array.
std::vector<web::json::value> ret;
for ( const auto& x : value )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace {{packageName}}.Client
public string SigningAlgorithm { get; set; }

/// <summary>
/// Gets the Signature validaty period in seconds
/// Gets the Signature validity period in seconds
/// </summary>
public int SignatureValidityPeriod { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ namespace {{packageName}}.Client
}

/// <summary>
/// Convert ANS1 format to DER format. Not recommended to use because it generate inavlid signature occationally.
/// Convert ANS1 format to DER format. Not recommended to use because it generate invalid signature occasionally.
/// </summary>
/// <param name="signedBytes"></param>
/// <returns></returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace {{packageName}}.{{clientPackage}}
public Exception Exception { get; }

/// <summary>
/// The ExcepetionEventArgs
/// The ExceptionEventArgs
/// </summary>
/// <param name="exception"></param>
public ExceptionEventArgs(Exception exception)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace {{packageName}}.{{clientPackage}}
public string SigningAlgorithm { get; set; }

/// <summary>
/// Gets the Signature validaty period in seconds
/// Gets the Signature validity period in seconds
/// </summary>
public int SignatureValidityPeriod { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ use function sprintf;
{{/vendorExtensions.x-group-parameters}}
{{#servers}}
{{#-first}}
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
* This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
{{/-first}}
* URL: {{{url}}}
{{#-last}}
Expand Down Expand Up @@ -219,7 +219,7 @@ use function sprintf;
{{/vendorExtensions.x-group-parameters}}
{{#servers}}
{{#-first}}
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
* This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
{{/-first}}
* URL: {{{url}}}
{{#-last}}
Expand Down Expand Up @@ -342,7 +342,7 @@ use function sprintf;
{{/vendorExtensions.x-group-parameters}}
{{#servers}}
{{#-first}}
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
* This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
{{/-first}}
* URL: {{{url}}}
{{#-last}}
Expand Down Expand Up @@ -383,7 +383,7 @@ use function sprintf;
{{/vendorExtensions.x-group-parameters}}
{{#servers}}
{{#-first}}
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
* This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
{{/-first}}
* URL: {{{url}}}
{{#-last}}
Expand Down Expand Up @@ -448,7 +448,7 @@ use function sprintf;
{{/vendorExtensions.x-group-parameters}}
{{#servers}}
{{#-first}}
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
* This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
{{/-first}}
* URL: {{{url}}}
{{#-last}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{#authMethods}}
{{#isOAuth}}
#' @field oauth_flow_type OAuth flow type
#' @field oauth_authorization_url Authoriziation URL
#' @field oauth_authorization_url Authorization URL
#' @field oauth_token_url Token URL
#' @field oauth_pkce Boolean flag to enable PKCE
{{/isOAuth}}
Expand Down Expand Up @@ -73,7 +73,7 @@ ApiClient <- R6::R6Class(
{{#isOAuth}}
# Flow type
oauth_flow_type = "{{flow}}",
# Authoriziation URL
# Authorization URL
oauth_authorization_url = "{{authorizationUrl}}",
# Token URL
oauth_token_url = "{{tokenUrl}}",
Expand Down Expand Up @@ -105,7 +105,7 @@ ApiClient <- R6::R6Class(
#' @param bearer_token Bearer token.
#' @param timeout Timeout.
#' @param retry_status_codes Status codes for retry.
#' @param max_retry_attempts Maxmium number of retry.
#' @param max_retry_attempts Maximum number of retry.
#' @export
initialize = function(base_path = NULL, user_agent = NULL,
default_headers = NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{#authMethods}}
{{#isOAuth}}
#' @field oauth_flow_type OAuth flow type
#' @field oauth_authorization_url Authoriziation URL
#' @field oauth_authorization_url Authorization URL
#' @field oauth_token_url Token URL
#' @field oauth_pkce Boolean flag to enable PKCE
#' @field oauth_scopes OAuth scopes
Expand Down Expand Up @@ -73,7 +73,7 @@ ApiClient <- R6::R6Class(
{{#isOAuth}}
# Flow type
oauth_flow_type = "{{flow}}",
# Authoriziation URL
# Authorization URL
oauth_authorization_url = "{{authorizationUrl}}",
# Token URL
oauth_token_url = "{{tokenUrl}}",
Expand Down Expand Up @@ -107,7 +107,7 @@ ApiClient <- R6::R6Class(
#' @param bearer_token Bearer token.
#' @param timeout Timeout.
#' @param retry_status_codes Status codes for retry.
#' @param max_retry_attempts Maxmium number of retry.
#' @param max_retry_attempts Maximum number of retry.
#' @export
initialize = function(base_path = NULL, user_agent = NULL,
default_headers = NULL,
Expand Down Expand Up @@ -306,7 +306,7 @@ ApiClient <- R6::R6Class(

req <- req %>% req_oauth_auth_code(client, scope = req_oauth_scopes,
pkce = self$oauth_pkce,
auth_url = self$oauth_authoriziation_url)
auth_url = self$oauth_authorization_url)
}

{{/hasOAuthMethods}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn dummy_authorization() -> Authorization {
// However, if you want to use it anyway this can not be unimplemented, so dummy implementation added.
// unimplemented!()
Authorization{
subject: "Dummmy".to_owned(),
subject: "Dummy".to_owned(),
scopes: Scopes::Some(BTreeSet::new()), // create an empty scope, as this should not be used
issuer: None
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
return Ok(Response::builder()
.status(StatusCode::INTERNAL_SERVER_ERROR)
.body(Body::from("Failed to process message part due an internal error".to_string()))
.expect("Unable to create Internal Server Error response due to an internal errror"))
.expect("Unable to create Internal Server Error response due to an internal error"))
},
SaveResult::Error(e) => {
return Ok(Response::builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This project depends on [Xoson](https://github.com/Topheee/xoson) `v2.2.0` (and
git clone 'https://github.com/Topheee/xoson.git'
```

Open the `Xoson.xojo_project` from the cloned git repository with Xojo and copy the `Xoson` module to your project. Similarily, open the `{{{projectName}}}.xojo_project` file with Xojo and copy `{{{projectName}}}` to your project.
Open the `Xoson.xojo_project` from the cloned git repository with Xojo and copy the `Xoson` module to your project. Similarly, open the `{{{projectName}}}.xojo_project` file with Xojo and copy `{{{projectName}}}` to your project.

> Since Xojo currently has no package manager, you need to manually copy both the `Xoson` and the `{{{projectName}}}` modules to your Xojo project.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
// TODO: autentication logic
// TODO: authentication logic
// https://platform.zapier.com/cli_tutorials/getting-started#adding-authentication
};
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ public void inheritanceWithInlineDiscriminator() {

// Contact
ComposedSchema contact = (ComposedSchema) openAPI.getComponents().getSchemas().get("Contact");
Schema contactAllOf = contact.getAllOf().get(1); // use the inline child scheam directly
Schema contactAllOf = contact.getAllOf().get(1); // use the inline child schema directly

assertEquals(contact.getExtensions().get("x-discriminator-value"), "contact");
assertEquals(contact.getAllOf().get(0).get$ref(), "#/components/schemas/Party");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void testOpenAPINormalizerEnableKeepOnlyFirstTagInOperation() {

@Test
public void testOpenAPINormalizerRemoveAnyOfOneOfAndKeepPropertiesOnly() {
// to test the rule REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIIES_ONLY
// to test the rule REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY
OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/removeAnyOfOneOfAndKeepPropertiesOnly_test.yaml");

Schema schema = openAPI.getComponents().getSchemas().get("Person");
Expand Down
2 changes: 1 addition & 1 deletion samples/client/echo_api/r/R/api_client.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ApiClient <- R6::R6Class(
#' @param bearer_token Bearer token.
#' @param timeout Timeout.
#' @param retry_status_codes Status codes for retry.
#' @param max_retry_attempts Maxmium number of retry.
#' @param max_retry_attempts Maximum number of retry.
#' @export
initialize = function(base_path = NULL, user_agent = NULL,
default_headers = NULL,
Expand Down
8 changes: 4 additions & 4 deletions samples/client/petstore/R-httr2-wrapper/R/api_client.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#' @field oauth_secret OAuth secret
#' @field oauth_refresh_token OAuth refresh token
#' @field oauth_flow_type OAuth flow type
#' @field oauth_authorization_url Authoriziation URL
#' @field oauth_authorization_url Authorization URL
#' @field oauth_token_url Token URL
#' @field oauth_pkce Boolean flag to enable PKCE
#' @field oauth_scopes OAuth scopes
Expand Down Expand Up @@ -68,7 +68,7 @@ ApiClient <- R6::R6Class(
# OAuth2
# Flow type
oauth_flow_type = "implicit",
# Authoriziation URL
# Authorization URL
oauth_authorization_url = "http://petstore.swagger.io/api/oauth/dialog",
# Token URL
oauth_token_url = "",
Expand Down Expand Up @@ -99,7 +99,7 @@ ApiClient <- R6::R6Class(
#' @param bearer_token Bearer token.
#' @param timeout Timeout.
#' @param retry_status_codes Status codes for retry.
#' @param max_retry_attempts Maxmium number of retry.
#' @param max_retry_attempts Maximum number of retry.
#' @export
initialize = function(base_path = NULL, user_agent = NULL,
default_headers = NULL,
Expand Down Expand Up @@ -296,7 +296,7 @@ ApiClient <- R6::R6Class(

req <- req %>% req_oauth_auth_code(client, scope = req_oauth_scopes,
pkce = self$oauth_pkce,
auth_url = self$oauth_authoriziation_url)
auth_url = self$oauth_authorization_url)
}

# stream data
Expand Down
8 changes: 4 additions & 4 deletions samples/client/petstore/R-httr2/R/api_client.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#' @field oauth_secret OAuth secret
#' @field oauth_refresh_token OAuth refresh token
#' @field oauth_flow_type OAuth flow type
#' @field oauth_authorization_url Authoriziation URL
#' @field oauth_authorization_url Authorization URL
#' @field oauth_token_url Token URL
#' @field oauth_pkce Boolean flag to enable PKCE
#' @field oauth_scopes OAuth scopes
Expand Down Expand Up @@ -68,7 +68,7 @@ ApiClient <- R6::R6Class(
# OAuth2
# Flow type
oauth_flow_type = "implicit",
# Authoriziation URL
# Authorization URL
oauth_authorization_url = "http://petstore.swagger.io/api/oauth/dialog",
# Token URL
oauth_token_url = "",
Expand Down Expand Up @@ -99,7 +99,7 @@ ApiClient <- R6::R6Class(
#' @param bearer_token Bearer token.
#' @param timeout Timeout.
#' @param retry_status_codes Status codes for retry.
#' @param max_retry_attempts Maxmium number of retry.
#' @param max_retry_attempts Maximum number of retry.
#' @export
initialize = function(base_path = NULL, user_agent = NULL,
default_headers = NULL,
Expand Down Expand Up @@ -296,7 +296,7 @@ ApiClient <- R6::R6Class(

req <- req %>% req_oauth_auth_code(client, scope = req_oauth_scopes,
pkce = self$oauth_pkce,
auth_url = self$oauth_authoriziation_url)
auth_url = self$oauth_authorization_url)
}

# stream data
Expand Down
6 changes: 3 additions & 3 deletions samples/client/petstore/R/R/api_client.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#' @field oauth_secret OAuth secret
#' @field oauth_refresh_token OAuth refresh token
#' @field oauth_flow_type OAuth flow type
#' @field oauth_authorization_url Authoriziation URL
#' @field oauth_authorization_url Authorization URL
#' @field oauth_token_url Token URL
#' @field oauth_pkce Boolean flag to enable PKCE
#' @field bearer_token Bearer token
Expand Down Expand Up @@ -68,7 +68,7 @@ ApiClient <- R6::R6Class(
# OAuth2
# Flow type
oauth_flow_type = "implicit",
# Authoriziation URL
# Authorization URL
oauth_authorization_url = "http://petstore.swagger.io/api/oauth/dialog",
# Token URL
oauth_token_url = "",
Expand Down Expand Up @@ -97,7 +97,7 @@ ApiClient <- R6::R6Class(
#' @param bearer_token Bearer token.
#' @param timeout Timeout.
#' @param retry_status_codes Status codes for retry.
#' @param max_retry_attempts Maxmium number of retry.
#' @param max_retry_attempts Maximum number of retry.
#' @export
initialize = function(base_path = NULL, user_agent = NULL,
default_headers = NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ web::json::value ModelBase::toJson( const std::vector<T>& value )
template<typename T>
web::json::value ModelBase::toJson( const std::set<T>& value )
{
// There's no protoype web::json::value::array(...) taking a std::set parameter. Converting to std::vector to get an array.
// There's no prototype web::json::value::array(...) taking a std::set parameter. Converting to std::vector to get an array.
std::vector<web::json::value> ret;
for ( const auto& x : value )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ExceptionEventArgs : EventArgs
public Exception Exception { get; }

/// <summary>
/// The ExcepetionEventArgs
/// The ExceptionEventArgs
/// </summary>
/// <param name="exception"></param>
public ExceptionEventArgs(Exception exception)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ExceptionEventArgs : EventArgs
public Exception Exception { get; }

/// <summary>
/// The ExcepetionEventArgs
/// The ExceptionEventArgs
/// </summary>
/// <param name="exception"></param>
public ExceptionEventArgs(Exception exception)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ExceptionEventArgs : EventArgs
public Exception Exception { get; }

/// <summary>
/// The ExcepetionEventArgs
/// The ExceptionEventArgs
/// </summary>
/// <param name="exception"></param>
public ExceptionEventArgs(Exception exception)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ExceptionEventArgs : EventArgs
public Exception Exception { get; }

/// <summary>
/// The ExcepetionEventArgs
/// The ExceptionEventArgs
/// </summary>
/// <param name="exception"></param>
public ExceptionEventArgs(Exception exception)
Expand Down
Loading
Loading