Skip to content

Fix typos #698

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

Merged
merged 2 commits into from
May 8, 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
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ Features:
Fixes:

- Bug with missing `name` property in in-path requests parameters
- Problem with usage `--route-types` with `--modular` option (mising import data contracts)
- Problem with usage `--route-types` with `--modular` option (missing import data contracts)

# 6.4.1

Expand Down Expand Up @@ -1347,7 +1347,7 @@ Changes: update documentation (+ add logo), add comment about author in generate
# 1.0.6

Fixes: route naming, http(s) requests for getting swagger schema, integer enums
Changes: include only required files into npm pacakge
Changes: include only required files into npm package

# 1.0.5

Expand Down
2 changes: 1 addition & 1 deletion src/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class CodeGenConfig {

/** { "#/components/schemas/Foo": @TypeInfo, ... } */
componentsMap = {};
/** flag for catching convertion from swagger 2.0 */
/** flag for catching conversion from swagger 2.0 */
convertedFromSwagger2 = false;

/** url index from paths used for merging into modules */
Expand Down
8 changes: 4 additions & 4 deletions templates/base/route-name.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ const methodAliases = {

const createCustomOperationId = (method, route, moduleName) => {
const hasPathInserts = /\{(\w){1,}\}/g.test(route);
const splitedRouteBySlash = _.compact(_.replace(route, /\{(\w){1,}\}/g, "").split("/"));
const routeParts = (splitedRouteBySlash.length > 1
? splitedRouteBySlash.splice(1)
: splitedRouteBySlash
const splittedRouteBySlash = _.compact(_.replace(route, /\{(\w){1,}\}/g, "").split("/"));
const routeParts = (splittedRouteBySlash.length > 1
? splittedRouteBySlash.splice(1)
: splittedRouteBySlash
).join("_");
return routeParts.length > 3 && methodAliases[method]
? methodAliases[method](routeParts, hasPathInserts)
Expand Down
2 changes: 1 addition & 1 deletion tests/generated/v3.0/additional-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export class HttpClient<SecurityDataType = unknown> {
}

/**
* @title Additional propeties Example
* @title Additional properties Example
* @version 1.0.0
*/
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {}
2 changes: 1 addition & 1 deletion tests/schemas/v3.0/additional-properties.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: "3.0.0"
info:
title: Additional propeties Example
title: Additional properties Example
version: 1.0.0
components:
schemas:
Expand Down
8 changes: 4 additions & 4 deletions tests/spec/templates/spec_templates/route-name.eta
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ const methodAliases = {

const createCustomOperationId = (method, route, moduleName) => {
const hasPathInserts = /\{(\w){1,}\}/g.test(route);
const splitedRouteBySlash = _.compact(_.replace(route, /\{(\w){1,}\}/g, "").split("/"));
const routeParts = (splitedRouteBySlash.length > 1
? splitedRouteBySlash.splice(1)
: splitedRouteBySlash
const splittedRouteBySlash = _.compact(_.replace(route, /\{(\w){1,}\}/g, "").split("/"));
const routeParts = (splittedRouteBySlash.length > 1
? splittedRouteBySlash.splice(1)
: splittedRouteBySlash
).join("_");
return routeParts.length > 3 && methodAliases[method]
? methodAliases[method](routeParts, hasPathInserts)
Expand Down