Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: state helper #207

Merged

Conversation

richardruiter
Copy link
Collaborator

@richardruiter richardruiter commented Nov 10, 2022

Description

Please include a summary of the change and which issue is fixed.

State helper gets the mocked state value using a key send within the cookie header.
If no value is found it will use the default context within the block.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Create a mock like this and set a cookie client side

{
"has_pending_order": {{#state key='has-pending-order'}}false{{/state}},
"cart": {{#state key='cart'}}[
{"id": 999, "name": "default prod"}
]{{/state}}
}

Checklist:

  • My code follows the guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • This does not break any existing functionalities
  • Any dependent changes have been merged and published in downstream modules

@shubhendumadhukar shubhendumadhukar merged commit 2107491 into testinggospels:develop Nov 11, 2022
shubhendumadhukar added a commit that referenced this pull request Nov 14, 2022
* fix: validating parameterized paths on the openapi is now supported
* fix: lazy loading the validation modules #203 (#206)
* feat: state helper (#207)
@richardruiter richardruiter deleted the state-helper branch November 16, 2022 05:28
shubhendumadhukar added a commit that referenced this pull request Nov 22, 2022
* fix: lazy loading the validation modules #203 (#206)
* feat: state helper (#207)
* feat: cookie support for the capture helper (#209)
* implement basic error response and metadata. #188
* docs: grpc documentation
* fix: race condition with lazy loading of the validation adapters (#210)
richardruiter pushed a commit to richardruiter/camouflage that referenced this pull request Nov 28, 2022
* fix: validating parameterized paths on the openapi is now supported
* fix: lazy loading the validation modules testinggospels#203 (testinggospels#206)
* feat: state helper (testinggospels#207)
richardruiter pushed a commit to richardruiter/camouflage that referenced this pull request Nov 28, 2022
* fix: lazy loading the validation modules testinggospels#203 (testinggospels#206)
* feat: state helper (testinggospels#207)
* feat: cookie support for the capture helper (testinggospels#209)
* implement basic error response and metadata. testinggospels#188
* docs: grpc documentation
* fix: race condition with lazy loading of the validation adapters (testinggospels#210)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants