Metadata-Version: 2.1
Name: sceptre-openapi-substitution-hook
Version: 0.0.1
Summary: A Sceptre hook for resolving variables in openapi definitions.
Home-page: https://github.com/nicholasphair/sceptre-openapi-substitution-hook
License: Apache-2.0
Keywords: sceptre,sceptre-hook,openapi
Author: Nicholas Phair
Author-email: np4ay@viginia.edu
Requires-Python: >=3.8,<3.12
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Project-URL: Repository, https://github.com/nicholasphair/sceptre-openapi-substitution-hook
Description-Content-Type: text/markdown

# README

## Overview

Performs simple string substitution in openapi specifications.

Should be used until CloudFormation [natively supports this feature][1].

## Installation

Installation instructions

To install directly from PyPI
```shell
python3 -m pip install sceptre-openapi-substitution-hook
```

To install from the git repo
```shell
python3 -m pip install git+https://github.com/nicholasphair/sceptre-openapi-substitution-hook
```

## Usage/Examples

Use the hook with a [hook point](https://docs.sceptre-project.org/latest/docs/hooks.html#hook-points)

```yaml
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

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



[1]: https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/1233

