freckle / stackctl

Manage CloudFormation Stacks through specifications
MIT License
14 stars 1 forks source link

pb/json bugfix #30

Closed pbrisbin closed 1 year ago

pbrisbin commented 1 year ago

Add (failing) spec on StackSpecYaml JSON

Fix invalid FromJSON(Action)

We were loading the same constructor by either tag. I also moved from asum to (<|>), which produces better failures

Fix JSON instance for StackSpecYaml

We didn't define a custom ToJSON for the ParamtersYaml or TagsYaml objects to generate the more natural key-value style, but we did define customer instances on the ParameterYaml and TagYaml element types. This resulted in some weird JSON during generation or capture. This commit fixes that, relying on the new failing test to be sure.

Update writeStackSpec to use ssSpecRoot

It has the same values as the separate parent argument, which predated it. Doing this means that the stackSpec...File functions are only used in contexts where them being relative makes more more sense.

And then being relative is also required to fix --filter.

Add spec on filtering from the output of generate

This failed until the previous commit.