acacode / acacode/swagger-typescript-api

basePath and host is undefined in apiConfig

Abierto
#530 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
4.1k
Forks
436
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.