BonnyPlug.AdmissionReview.Request.add_warning

You're seeing just the function add_warning, go back to BonnyPlug.AdmissionReview.Request module for more information.
Link to this function

add_warning(admission_review, warning)

View Source

Specs

Adds a warning to the admission review's response.

Examples

iex> admission_review = %BonnyPlug.AdmissionReview{request: %{}, response: %{}}
...> BonnyPlug.AdmissionReview.Request.add_warning(admission_review, "warning")
%BonnyPlug.AdmissionReview{request: %{}, response: %{"warnings" => ["warning"]}}

iex> admission_review = %BonnyPlug.AdmissionReview{request: %{}, response: %{"warnings" => ["existing_warning"]}}
...> BonnyPlug.AdmissionReview.Request.add_warning(admission_review, "new_warning")
%BonnyPlug.AdmissionReview{request: %{}, response: %{"warnings" => ["new_warning", "existing_warning"]}}