Skip to content

Commit

Permalink
fix: Set breakLength and fix output file
Browse files Browse the repository at this point in the history
  • Loading branch information
ffflorian committed May 8, 2019
1 parent 8967cdd commit eb2ecda
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Options:

const helpArg = argv.h || argv.help;
const inputArg = argv.i || argv.input;
const outputArg = argv.i || argv.output;
const outputArg = argv.o || argv.output;
const versionArg = argv.v || argv.version;

if (versionArg) {
Expand Down
2 changes: 1 addition & 1 deletion src/info/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class BaseClient implements SwaxiosGenerator {
delete fileIndex.files[this.filePath];

const API = await this.generateAPI(fileIndex);
const apiString = inspect(API).replace(/'/gm, '');
const apiString = inspect(API, {breakLength: Infinity}).replace(/'/gm, '');
const imports = await this.generateImports(fileIndex);

return {
Expand Down
2 changes: 1 addition & 1 deletion src/info/ParsedResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ParsedResource implements SwaxiosGenerator {
public methods: RequestMethod[] = [];
public name: string;

constructor(fullyQualifiedName: string, resourceDefinitions: {[pathName: string]: Path} = {}, spec: Spec) {
constructor(fullyQualifiedName: string, resourceDefinitions: Record<string, Path> = {}, spec: Spec) {
const stopIndex = fullyQualifiedName.lastIndexOf('/');

if (stopIndex > -1) {
Expand Down
2 changes: 1 addition & 1 deletion src/info/RequestMethod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class RequestMethod {
schema[propertyName] = this.buildType(properties[property]);
}

return inspect(schema)
return inspect(schema, {breakLength: Infinity})
.replace(/'/gm, '')
.replace(',', ';')
.replace(new RegExp('\\n', 'g'), '');
Expand Down

0 comments on commit eb2ecda

Please sign in to comment.