swagger-modifier v1.3.3
Swagger Modifier
This tool modifies Swagger files by adding prefixes and suffixes to operation IDs and references.
Installation
npm install -g swagger-modifierUsage
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.jsonconfig.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.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago