acacode / acacode/swagger-typescript-api

basePath and host is undefined in apiConfig

Open
#530 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.1k
Forks
436
PR merge metrics
No merged PRs in 30d

Description

I need basePath for customisation in the template but i am getting it undefined in axios-http-client.ejs. I believe baseUrl is combination of **schemes + host + basePath**. So these fields can be populated. Below sample console output of apiConfig.

apiConfig info -- {
info: {
title: 'ABC Manager APIs',
version: 'v10.2',
description: '',
contact: {
name: 'ABC Inc.',
url: 'http://www.abc.com',
email: 'support@abc.com'
},
license: { name: 'Abc Inc.', url: 'http://www.abc.com' },
'x-internal': { exposed: 'public', 'service-principals': [Array] }
},
servers: [ { url: 'https://abc.com:10101/experienceManager/v1' } ],
basePath: undefined,
host: undefined,
externalDocs: { url: '', description: '' },
tags: [ { name: 'ExperienceArtifactCategory' }, { name: 'PageGroup' } ],
baseUrl: 'https://abc.com:10101/experienceManager/v1',
title: 'Abc Manager APIs',
version: 'v10.2'
}

For above sample expected is as below:

apiConfig info -- {
info: {
title: 'ABC Manager APIs',
version: 'v10.2',
description: '',
contact: {
name: 'ABC Inc.',
url: 'http://www.abc.com',
email: 'support@abc.com'
},
license: { name: 'Abc Inc.', url: 'http://www.abc.com' },
'x-internal': { exposed: 'public', 'service-principals': [Array] }
},
servers: [ { url: 'https://abc.com:10101/experienceManager/v1' } ],
**basePath: '/experienceManager/v1',
host: 'abc.com:10101',**
externalDocs: { url: '', description: '' },
tags: [ { name: 'ExperienceArtifactCategory' }, { name: 'PageGroup' } ],
baseUrl: 'https://abc.com:10101/experienceManager/v1',
title: 'Abc Manager APIs',
version: 'v10.2'
}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.