Skip to content

Instantly share code, notes, and snippets.

@hpjaj
Created March 20, 2018 14:26
Show Gist options
  • Select an option

  • Save hpjaj/6c3a48637a7b3a0abc758f8428e66b06 to your computer and use it in GitHub Desktop.

Select an option

Save hpjaj/6c3a48637a7b3a0abc758f8428e66b06 to your computer and use it in GitHub Desktop.
slideOptions
transition slideNumber
slide
true

Endpoint Punch List


Endpoint Code


Swagger Docs


Betamocks


Spec Coverage


Frontend Signoff

{
  "data": {
    "attributes": {
      "email": "john@example.com",
      "effective_at": "2018-02-27T14:41:32.283Z"
    }
  }
}

✅ ✅ ✅


Endpoint Code



Endpoint Creation

  • Integrate an external service
  • Service object
  • Controller, route and serializer

Service Object

  • Calls the service's endpoints
  • Dependencies
    • Service class
    • Config class & Faraday connection
    • Response class
    • settings.yml




Swagger Docs


Request/Response Docs


Model Docs


Swagger Files

app/swagger/requests/*
app/swagger/schemas/*
app/controllers/v0/apidocs_controller.rb

Swagger implementation


Betamocks


Betamocks Process

  1. Set config
  2. Create recording
  3. Update mock data table



Spec Coverage


Spec Areas


match_response_schema

expect(response).to match_response_schema(
  'email_address_response'
)


In Conclusion



Resources


Questions?


Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment