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

Generate RandomValueController when random value option is set #69

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

korser1
Copy link
Contributor

@korser1 korser1 commented Jan 12, 2022

No description provided.

Copy link
Contributor

@ccheetham ccheetham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of generating code specific to --configuration-random-value. The absence of which lessens the value of the generated code.

To be consistent with the Weather Forecast app, it would be better if WeatherForecastController included the random value(s). E.e., rng.Next could be replaced with a Steeltoe snippet.

A request to the forecast endpoint wouldn't show anything of note in the returned payload. However a log message with random value would suffuce.

@korser1
Copy link
Contributor Author

korser1 commented Jan 18, 2022

Thank you for your reply.
A replacement of weather controller would work, but when only one feature is switched on.
My plan was to create controller per each feature, where some value is returned.

  1. Random value -> controller for random values
  2. Circuit breaker -> controller for hystrix
  3. ....

Another way is to generate endpoints for feature in weather controller

@korser1 korser1 force-pushed the korser1/random-values-controller branch from f385bbe to 2be22bb Compare January 21, 2022 15:41
@korser1 korser1 force-pushed the korser1/random-values-controller branch from 2be22bb to 2df0686 Compare January 21, 2022 15:42
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