acacode / acacode/swagger-typescript-api

basePath and host is undefined in apiConfig

Aperta
#530 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
4.1k
Fork
436
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.