A Semantic Release plugin to update versions in OpenAPI specifications.
This module is distributed via npm and should be installed as one of your project's devDependencies
:
npm install --save-dev @aensley/semantic-release-openapi
This plugin has one configuration option which must be supplied.
-
apiSpecFiles
: An array of OpenAPI specification file paths. Glob patterns (e.g.'*.yaml'
) are supported.All matching files must have a
.json
,.yaml
, or.yml
extension.
IMPORTANT: Semantic Release will not commit changes to your OpenAPI spec files unless you add the same files in assets
for the @semantic-release/git plugin! See the example below.
{
"release": {
"plugins": [
[
"@aensley/semantic-release-openapi",
{
"apiSpecFiles": ["openapi.yaml", "src/swagger-*.json"]
}
],
[
"@semantic-release/git",
{
"assets": ["package.json", "openapi.yaml", "src/swagger-*.json"]
}
]
]
}
}