acacode / acacode/swagger-typescript-api

basePath and host is undefined in apiConfig

Đang mở
#530 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
4.1k
Fork
436
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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'
}

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.