API Documentation and Testing

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:05
    Now that we've decided we want to build
  • 0:06
    a decoupled site, it's a good time to start thinking about our API from a design,
  • 0:10
    documentation and testing perspective. In this lesson we're going to take a look at
  • 0:15
    a service called apiary.io, then we'll take a look at a few similar open source tools
  • 0:19
    that allow us to accomplish similar goals to Apiary, namely having our API documented
  • 0:24
    and testable. To do that we'll introduce the API Blueprint Markdown specification,
  • 0:30
    the Dredd testing tool, and another library called Aglio for generating HTML documentation
  • 0:37
    for our API. Apiary.io is a service that helps us
  • 0:41
    manage our API. It allows us to design it collaboratively in Markdown with a handy
  • 0:46
    online editor, generate API, mock servers, documentation, testing, and gives us a
  • 0:05
    Agora que decidimos que queremos construir
  • 0:06
    um site dissociado, é uma boa hora para começar a pensar sobre nossa API a partir de um ponto de vista
  • 0:10
    de design, teste e documentação. Nessa lição, iremos dar uma olhada
  • 0:15
    num serviço chamado apiary.io, depois iremos dar uma olhada em alguas ferramentas de código aberto
  • 0:19
    que nos permitem atingir objetivos similares ao Apiary, isto é, tendo nossa API documentada
  • 0:24
    e testável. Para fazer isso, iremos introduzir a especificação da API Blueprint Markdown,
  • 0:30
    a ferramenta de teste Dredd, e outra biblioteca chamada Aglio para gerar documentação HTML
  • 0:37
    para nossa API. O Apiary.io é um serviço que nos ajuda
  • 0:41
    a gerir nossa API. Ele nos permite arquitetá-la colaborativamente em Markdown com um
  • 0:46
    editor online conveniente, gerando uma API, servidores simulados, documentação, testes, e nos dá
Loading ...

API Documentation and Testing

Loading...

In this tutorial, I'll introduce the API Blueprint specification and take a look at a few tools we can use to provide documentation and testing for our API.

The tools we'll look at include:

By the end of the tutorial you'll have a better understanding of the API Blueprint specification and be able to use Dredd and Aglio to ensure your API documentation and testing stay up-to-date.

Self-check question: Could you write a script that could be run after every commit that would keep your documentation up-to-date, and provide API test results?

Downloads: 
Log in or sign up to download companion files.
Additional resources: