Skip to main content

A Sceptre hook for resolving variables in openapi definitions.

Project description

README

Overview

Performs simple string substitution in openapi specifications.

Should be used until CloudFormation natively supports this feature.

Installation

Installation instructions

To install directly from PyPI

python3 -m pip install sceptre-openapi-substitution-hook

To install from the git repo

python3 -m pip install git+https://github.com/nicholasphair/sceptre-openapi-substitution-hook

Usage/Examples

Use the hook with a hook point

hooks:
  <hook_point>:
    - !openapi_substituter
      openapi:
        input: <input_path>
        output: <output_path>
        substitutions:
          <key>: <val>

The substituer will look for strings in the form of ${<key>} and replace them with <val>.

Example

hooks:
  before_validate:
    - !openapi_substituter
      openapi:
        input: ../templates/openapi.yaml
        output: ../templates/openapi.yaml
        substitutions:
          foo: bar
          baz: qux

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page