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 is missing in v0.2.x

exoego opened this issue · comments

In v0.1.x, there was --api-prefix.

A, --api-prefix <prefix>      Specify target prefix for swagger tags. (default "sls")

which seems missing in v0.2.x and blocks me updating sis to v0.2.x .

What is a reason it is unimplemented in v0.2.x ?
Are there any equivalent to v0.2.x or migration path ?

I have removed --api-prefix in order to eliminate the need for tool-specific descriptions in the spec file.

In v0.2, the same behavior is realized as follows.

  • Set all: false on sis.config.json or x-sis-config in info section on the spec file.
  • Add x-sis-config to operation section in path section.
  • If you need, you can override the API settings by adding settings to x-sis-config in operation section.

OK.
What attributes are needed in x-sis-config to realize the v0.1.x behavior of api-prefix ?

If you don't need any individual settings, write as follows.

paths:
  /pet:
    put:
      x-sis-config: {}
      tags:
      - pet

Thanks, but what I want to know is how to continue using "tags with prefix" like below

 tags:
      - sis-pet

Currently does not exist.
OK, I will re-implement the --api-prefix feature.