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

File details

Details for the file sceptre_openapi_substitution_hook-0.0.1.tar.gz.

File metadata

File hashes

Hashes for sceptre_openapi_substitution_hook-0.0.1.tar.gz
Algorithm Hash digest
SHA256 205ad0ada724f78e04e3e634a3e29210cd0edd3b71531a7428fa1df0527838b5
MD5 9b4fee72ff21ad28a87f41f8d53a14a7
BLAKE2b-256 c13d1e7d1f09dacaa3a0cc3bdce6d78a0fb535f456fb142c8a8b26d4f57e556e

See more details on using hashes here.

File details

Details for the file sceptre_openapi_substitution_hook-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sceptre_openapi_substitution_hook-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 59d1b0a7dabccc8d076a4cc469ce8defde0a49dff3cd65e9761887a0f80561e7
MD5 4ffe2d1622f5e209d12c7821b0377847
BLAKE2b-256 7e156d812bcba827b88ccc9de431fd45a016fcedf936642ca98679a97f20cd79

See more details on using hashes here.

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