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
Release history Release notifications | RSS feed
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
- Download URL: sceptre_openapi_substitution_hook-0.0.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 205ad0ada724f78e04e3e634a3e29210cd0edd3b71531a7428fa1df0527838b5 |
|
MD5 | 9b4fee72ff21ad28a87f41f8d53a14a7 |
|
BLAKE2b-256 | c13d1e7d1f09dacaa3a0cc3bdce6d78a0fb535f456fb142c8a8b26d4f57e556e |
File details
Details for the file sceptre_openapi_substitution_hook-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: sceptre_openapi_substitution_hook-0.0.1-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59d1b0a7dabccc8d076a4cc469ce8defde0a49dff3cd65e9761887a0f80561e7 |
|
MD5 | 4ffe2d1622f5e209d12c7821b0377847 |
|
BLAKE2b-256 | 7e156d812bcba827b88ccc9de431fd45a016fcedf936642ca98679a97f20cd79 |