- Rename to align styles

This commit is contained in:
Ferdi Koomen 2020-05-30 15:49:41 +02:00
parent 5e21a372ee
commit 3440867065
14 changed files with 15 additions and 15 deletions

View File

@ -4,7 +4,7 @@ import { getOpenApiSpec } from './utils/getOpenApiSpec';
import { getOpenApiVersion, OpenApiVersion } from './utils/getOpenApiVersion';
import { isString } from './utils/isString';
import { postProcessClient } from './utils/postProcessClient';
import { registerHandlebarsTemplates } from './utils/registerHandlebarsTemplates';
import { registerHandlebarTemplates } from './utils/registerHandlebarTemplates';
import { writeClient } from './utils/writeClient';
export enum HttpClient {
@ -56,7 +56,7 @@ export async function generate({
// handlebar templates for the given language
const openApi = isString(input) ? await getOpenApiSpec(input) : input;
const openApiVersion = getOpenApiVersion(openApi);
const templates = registerHandlebarsTemplates();
const templates = registerHandlebarTemplates();
switch (openApiVersion) {
case OpenApiVersion.V2: {

View File

@ -41,7 +41,7 @@ export interface Templates {
* Read all the Handlebar templates that we need and return on wrapper object
* so we can easily access the templates in out generator / write functions.
*/
export function registerHandlebarsTemplates(): Templates {
export function registerHandlebarTemplates(): Templates {
registerHandlebarHelpers();
const templates: Templates = {

View File

@ -1,7 +1,7 @@
import { Client } from '../client/interfaces/Client';
import { HttpClient } from '../index';
import { mkdir, rmdir, writeFile } from './fileSystem';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
import { writeClient } from './writeClient';
jest.mock('./fileSystem');

View File

@ -3,7 +3,7 @@ import * as path from 'path';
import { Client } from '../client/interfaces/Client';
import { HttpClient } from '../index';
import { copyFile, mkdir, rmdir } from './fileSystem';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
import { writeClientIndex } from './writeClientIndex';
import { writeClientModels } from './writeClientModels';
import { writeClientSchemas } from './writeClientSchemas';

View File

@ -1,6 +1,6 @@
import { Client } from '../client/interfaces/Client';
import { writeFile } from './fileSystem';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
import { writeClientIndex } from './writeClientIndex';
jest.mock('./fileSystem');

View File

@ -4,7 +4,7 @@ import { Client } from '../client/interfaces/Client';
import { writeFile } from './fileSystem';
import { getModelNames } from './getModelNames';
import { getServiceNames } from './getServiceNames';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
/**
* Generate the OpenAPI client index file using the Handlebar template and write it to disk.

View File

@ -1,6 +1,6 @@
import { Model } from '../client/interfaces/Model';
import { writeFile } from './fileSystem';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
import { writeClientModels } from './writeClientModels';
jest.mock('./fileSystem');

View File

@ -3,7 +3,7 @@ import * as path from 'path';
import { Model } from '../client/interfaces/Model';
import { writeFile } from './fileSystem';
import { format } from './format';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
/**
* Generate Models using the Handlebar template and write to disk.

View File

@ -1,6 +1,6 @@
import { Model } from '../client/interfaces/Model';
import { writeFile } from './fileSystem';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
import { writeClientSchemas } from './writeClientSchemas';
jest.mock('./fileSystem');

View File

@ -3,7 +3,7 @@ import * as path from 'path';
import { Model } from '../client/interfaces/Model';
import { writeFile } from './fileSystem';
import { format } from './format';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
/**
* Generate Schemas using the Handlebar template and write to disk.

View File

@ -1,6 +1,6 @@
import { Service } from '../client/interfaces/Service';
import { writeFile } from './fileSystem';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
import { writeClientServices } from './writeClientServices';
jest.mock('./fileSystem');

View File

@ -3,7 +3,7 @@ import * as path from 'path';
import { Service } from '../client/interfaces/Service';
import { writeFile } from './fileSystem';
import { format } from './format';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
/**
* Generate Services using the Handlebar template and write to disk.

View File

@ -1,7 +1,7 @@
import { Client } from '../client/interfaces/Client';
import { HttpClient } from '../index';
import { writeFile } from './fileSystem';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
import { writeClientSettings } from './writeClientSettings';
jest.mock('./fileSystem');

View File

@ -3,7 +3,7 @@ import * as path from 'path';
import { Client } from '../client/interfaces/Client';
import { HttpClient } from '../index';
import { writeFile } from './fileSystem';
import { Templates } from './registerHandlebarsTemplates';
import { Templates } from './registerHandlebarTemplates';
/**
* Generate OpenAPI configuration file "OpenAPI.ts"