Sha256: 88d8079477171c4c11a3c551ee92c5a15c801baf624dea29e9b1c909a49885bf

Contents?: true

Size: 1.31 KB

Versions: 8

Compression:

Stored size: 1.31 KB

Contents

<%

api_title = "Negative Case - 3 - should set proper errors when registration information is missing"

api_input = <<-eos
{
  "uuid": "jh01u2g01h301h21h23",
  "device_token": "0182y3b28107b31",
  "device_name": "Apple iPhone",
  "device_type": "iPhone 7 Plus",
  "operating_system": "iOS",
  "software_version": "iOS 11.2.2"
}
eos

api_output = <<-eos
{
  "success": false,
  "errors": {
      "heading": "Registring new mobile number FAILED",
      "message": "Check if all mandatory details are passed. Refer the error details for technical information",
      "details": {
          "country": [
              "must exist"
          ],
          "dialing_prefix": [
              "can't be blank",
              "is too short (minimum is 2 characters)"
          ],
          "mobile_number": [
              "can't be blank",
              "is too short (minimum is 9 characters)"
          ]
      }
  }
}
eos

%>

<%= render partial: "kuppayam/api/docs/example", locals: {
                                        negative_case: true,
                                        example_id: "neg_case_3",
                                        api_title: api_title,
                                        api_input: api_input,
                                        api_output: api_output 
                                      } %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
usman-0.3.0 app/views/usman/api/v1/docs/register/_neg_case_3.html.erb
usman-0.2.11 app/views/usman/api/v1/docs/register/_neg_case_3.html.erb
usman-0.2.10 app/views/usman/api/v1/docs/register/_neg_case_3.html.erb
usman-0.2.9 app/views/usman/api/v1/docs/register/_neg_case_3.html.erb
usman-0.2.8 app/views/usman/api/v1/docs/register/_neg_case_3.html.erb
usman-0.2.7 app/views/usman/api/v1/docs/register/_neg_case_3.html.erb
usman-0.2.6 app/views/usman/api/v1/docs/register/_neg_case_3.html.erb
usman-0.2.5 app/views/usman/api/v1/docs/register/_neg_case_3.html.erb