1.3.3 • Published 2 years ago

swagger-modifier v1.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Swagger Modifier

This tool modifies Swagger files by adding prefixes and suffixes to operation IDs and references.

Installation

npm install -g swagger-modifier

Usage

swagger-modifier -i <inputFilePath> -o <outputFilePath> -c <configMapping>

Options:

-i, --input : Path to the input Swagger file. -o, --output : Path to the output directory. -c, --config : Path to the JSON file containing a map of operation IDs to prefixes and suffixes.

Example:

swagger-modifier -i swagger.json -o modified-swagger.json -c config.json

config.json:

{
  "endpoints": [
    {
      "packageName": "users-create-service",
      "path": "/users",
      "method": "post",
      "prefix": "USER_CREATE_",
      "suffix": "_V1",
      "inputSuffix": "_Input",
      "ignore": [],
      "openapi-config": {}
    },
    {
      "packageName": "users-get-service",
      "path": "/users",
      "method": "get",
      "prefix": "USER_GET_",
      "suffix": "_V1",
      "inputSuffix": "_Input",
      "inputSuffix": "_Input",
      "ignore": []
    }
  ]
}

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago