Package: deforest
deforestRemove allx-amazon-tags from your Open API 3 or Swagger 2 specification. Useful if you are using Cloudformation to specify your API Gateways, and want to provide your consumers with the same specification but not wanting to disclose your internal Amazon integrations.Installationpip install --user deforestFeaturesClean keys starting with the stringx-amazonHandles JSON and YAML inputHandles JSON and YAML output (defaults to YAML)Support for AWS CloudFormation templatesAWS::ApiGateway::RestApi resource typeAWS::Serverless::Api resource typeUsageUsage: deforest [OPTIONS] INFILE

Options:
  -o, --outfile TEXT        specify output file, default is
                            ./<title>-<version>.<format>, ignored if input is
                            a CloudFormation template and the template
                            contains more than one ApiGateway resource)
  -f, --format [yaml|json]  output format  [default: yaml]
  -i, --indent INTEGER      if output format is json, specify indentation
  -d, --debug               if enabled, show debug logs
  --no-ignore               if set, deforest will export paths marked as
                            ignored
  --version                 Show the version and exit.
  --help                    Show this message and exit.CloudFormation templatesVersion 0.1.1 and later supports CloudFormation templates as input. If more than one API Gateway is part of the template, the--outfileflag will be ignored.Hide pathsVersion 0.2.0 introduced support for deforest to ignore certain paths. If you specifyx-deforest-ignore: trueanywhere in your specification, deforest will not extract itsparentnode to the end results. Example:paths:"/validation":post:responses:"200":schema:type:arrayitems:"$ref":"#/definitions/Error"headers:test-method-response-header:type:stringget:x-deforest-ignore:trueparameters:-name:q1in:queryrequired:trueresponses:"200":schema:type:arrayitems:"$ref":"#/definitions/Error"headers:test-method-response-header:type:stringwill result inpaths:/validation:post:responses:"200":headers:test-method-response-header:type:stringschema:items:$ref:"#/definitions/Error"type:arrayIf we'd written this:paths:"/validation":x-deforest-ignore:truepost:responses:"200":schema:type:arrayitems:"$ref":"#/definitions/Error"headers:test-method-response-header:type:stringget:parameters:-name:q1in:queryrequired:trueresponses:"200":schema:type:arrayitems:"$ref":"#/definitions/Error"headers:test-method-response-header:type:stringwe'd get an empty result since theparentnode is removed:paths:{}Ifx-deforest-ignore: false, or missing, the node will be extracted as usual. If the runtime flag--no-ignoreis set, the nodes will be extracted as usual as well.LimitationsThe output file looses its order of the keys in the file, which shouldn't affect you if you're using a converter to create a graphical documentation/specification - but can be confusing if you have a specific internal order you wish to keep.ContributeIf you wish to see a specific feature, please create an issue in the issue tracker - and if you want to help develop deforest, you're free to create a pull request as well. All submitted code will be subject to the licensing specified in the LICENSE file.