mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
- Rename to align styles
This commit is contained in:
parent
5e21a372ee
commit
3440867065
@ -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: {
|
||||
|
||||
@ -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 = {
|
||||
@ -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');
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user