File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/schema-to-typescript/common Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ export function generateClient({
9797 errorClassName,
9898 generateJsDoc,
9999 generateErrorJsDoc,
100+ baseUrl,
100101 ...filenameConfig
101102 } ,
102103 generatedServiceImports,
@@ -163,7 +164,10 @@ export function generateClient({
163164 memberExpression ( identifier ( commonHttpClientImportName ) , identifier ( commonHttpClientClassName ) ) ,
164165 [
165166 objectExpression ( [
166- objectProperty ( identifier ( 'baseUrl' ) , stringLiteral ( servers [ 0 ] ?. url ?? defaultServerUrl ) ) ,
167+ objectProperty (
168+ identifier ( 'baseUrl' ) ,
169+ stringLiteral ( baseUrl ?? servers [ 0 ] ?. url ?? defaultServerUrl )
170+ ) ,
167171 objectProperty ( identifier ( 'binaryResponseType' ) , stringLiteral ( responseBinaryType ) ) ,
168172 objectProperty ( identifier ( 'errorClass' ) , identifier ( errorTypeName ) )
169173 ] )
You can’t perform that action at this time.
0 commit comments