AKIRA-MIYAKE / serverless-import-swagger

Import functions from OpenAPI spec file to serverless.yml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

api-prefix can not be empty

exoego opened this issue · comments

I want to tag APIs simply noun, without any prefix like sls-. E.g. just pet or shop, not sls-pet or sls-shop. So my API users have no need to care about prefix.

To do this, I tried passing options --api-prefix "" to sis.
However, it looks like that sis does not accept empty string and does not import swagger.yaml anymore.

I guess this might be due to the below line, where empty string fall back to sls-,

apiPrefix: (commander.apiPrefix) ? commander.apiPrefix : 'sls',

Could be resolved if #16 resolved