New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

swagger-axios-codegen

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-axios-codegen - npm Package Compare versions

Comparing version 0.11.7 to 0.11.8

dist/index copy 2.d.ts

4

CHANGELOG.md
## 0.11.8
- fix basePath
### 0.11.7

@@ -3,0 +7,0 @@

3

dist/index.js

@@ -78,3 +78,3 @@ "use strict";

let apiSource = '';
let serviceHeaderSource = options.useCustomerRequestInstance ? serviceHeader_1.customerServiceHeader(options, swaggerSource.basePath) : serviceHeader_1.serviceHeader(options, swaggerSource.basePath);
let serviceHeaderSource = options.useCustomerRequestInstance ? serviceHeader_1.customerServiceHeader(options) : serviceHeader_1.serviceHeader(options);
if (options.sharedServiceOptions) {

@@ -87,2 +87,3 @@ writeFile(options.outputDir || '', 'serviceOptions.ts' || '', format(serviceHeaderSource, options));

}
apiSource += `const basePath = '${utils_1.trimString(swaggerSource.basePath, '/', 'right')}'`;
apiSource += serviceHeader_1.definitionHeader(options.extendDefinitionFile);

@@ -89,0 +90,0 @@ // 判断是否是openApi3.0或者swagger3.0

@@ -27,7 +27,9 @@ "use strict";

export interface IPagedResult<T> extends IListResult<T> {
totalCount: number
totalCount?: number;
items?: T[];
}
export class PagedResultDto<T> implements IPagedResult<T> {
totalCount!: number
totalCount?: number;
items?: T[];
}

@@ -34,0 +36,0 @@ `;

import { ISwaggerOptions } from "../baseInterfaces";
export declare function serviceHeader(options: ISwaggerOptions, basePath: string): string;
export declare function customerServiceHeader(options: ISwaggerOptions, basePath: string): string;
export declare function serviceHeader(options: ISwaggerOptions): string;
export declare function customerServiceHeader(options: ISwaggerOptions): string;
export declare function definitionHeader(fileDir: string | undefined): string;

@@ -13,4 +13,3 @@ "use strict";

const genericTypeDefinitionTemplate_1 = require("./genericTypeDefinitionTemplate");
const utils_1 = require("../utils");
function serviceHeader(options, basePath) {
function serviceHeader(options) {
const classTransformerImport = options.useClassTransformer

@@ -24,3 +23,2 @@ ? `import { Expose, Transform, Type, plainToClass } from 'class-transformer';

const basePath = '${utils_1.trimString(basePath, '/', 'right')}'
${classTransformerImport}

@@ -51,3 +49,3 @@

exports.serviceHeader = serviceHeader;
function customerServiceHeader(options, basePath) {
function customerServiceHeader(options) {
return `/** Generate by swagger-axios-codegen */

@@ -85,4 +83,2 @@ // tslint:disable

const basePath = '${basePath}'
// Add options interface

@@ -120,3 +116,2 @@ export interface ServiceOptions {

export function getConfigs(method: string, contentType: string, url: string,options: any):IRequestConfig {
url = basePath + url
const configs: IRequestConfig = { ...options, method, url };

@@ -123,0 +118,0 @@ configs.headers = {

@@ -152,3 +152,3 @@ "use strict";

return new Promise((resolve, reject) => {
let url = '${path}'
let url = basePath+'${path}'
${pathReplace}

@@ -155,0 +155,0 @@ ${parsedParameters && headerParameters && headerParameters.length > 0

{
"name": "swagger-axios-codegen",
"version": "0.11.7",
"version": "0.11.8",
"main": "./dist/index",

@@ -39,4 +39,4 @@ "typings": "./dist/",

"tslint": "^5.10.0",
"typescript": "^3.7.2"
"typescript": "^4.0.2"
}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc