Sha256: 0484640cbb88c73dff0d16e5c465fc01ed812490b2aa0ed0ddd1245c6fe64138

Contents?: true

Size: 1.27 KB

Versions: 49

Compression:

Stored size: 1.27 KB

Contents

<%

api_title = "Negative Case - 1 - should set proper errors if no input is given"

api_input = <<-eos
Example:

POST #{request.base_url}/api/v1/register
{}
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)"
          ],
          "uuid": [
              "can't be blank"
          ],
          "device_token": [
              "can't be blank"
          ]
      }
  }
}
eos

%>

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

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
usman-0.3.29 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.28 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.27 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.26 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.25 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.24 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.23 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.22 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.21 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.20 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.19 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.18 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.17 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.16 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.15 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.14 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.13 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.12 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.11 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
usman-0.3.10 app/views/usman/api/v1/docs/register/_neg_case_1.html.erb