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

Ambassador - Provide possibility to disable everything at root level - with corresponding possibility to enable at path/method level #163

Merged

Conversation

kylehodgetts
Copy link
Contributor

Add global level disable option to enable blanket disable on all paths
and operations. Paths and Operations can then be enabled when they are
deemed to be ready by overriding the disabled field at the path and
field levels.

Change disabled field in SubOptions from boolean to pointer to a boolean
to implement the following semantics:

  • If nil, not explicitely set, then check for value at level above -
    if at operation, check path level. If at path level, check global
    level
  • If has a value be it True or False, disregard the disabled setting at
    the level above as it has been explicitely set

Implement useful helper methods IsOperationDisabled and IsPathDisabled
with the Option struct reciever which implement the semantics listed
above

resolves #148

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

Kyle Hodgetts added 5 commits September 15, 2021 14:40
…anket disable on all operations on path and then can expose operations when they are deemed ready by overriding the disabled field at the operation level
and operations. Paths and Operations can then be enabled when they are
deemed to be ready by overriding the disabled field at the path and
field levels.

Change disabled field in SubOptions from boolean to pointer to a boolean
to implement the following semantics:
- If nil, not explicitely set, then check for value at level above -
 if at operation, check path level. If at path level, check global
level
- If has a value be it True or False, disregard the disabled setting at
  the level above as it has been explicitely set

Implement useful helper methods IsOperationDisabled and IsPathDisabled
with the Option struct reciever which implement the semantics listed
above
boolean pointer. Use Options helper methods for determining whether a
path or operation is disabled
@kylehodgetts kylehodgetts force-pushed the kylehodgetts/enhancement/148-hide-properties-default branch from 14f70cc to 4dfda4d Compare September 15, 2021 12:03
@kylehodgetts kylehodgetts changed the title Provide possibility to disable everything at root level - with corresponding possibility to enable at path/method level Ambassador - Provide possibility to disable everything at root level - with corresponding possibility to enable at path/method level Sep 15, 2021
@kylehodgetts kylehodgetts marked this pull request as ready for review September 15, 2021 12:09
@kylehodgetts kylehodgetts merged commit d4b366f into main Sep 15, 2021
@kylehodgetts kylehodgetts deleted the kylehodgetts/enhancement/148-hide-properties-default branch September 15, 2021 12:11
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.

Option/property to hide all operations by default
2 participants