Microservice Challenge Part 2: The Swaggering

In this post I'd like to define the ID service api. To make this concrete I'll be using Swagger, which is supported by all the languages and frameworks I'm going to pursue.

The ID service api will be very simple. A request may be made using the following uri pattern:

/ids/namespace/size

where namespace defines a label for ids of the same type, and size if the number of ids to return. For example

/ids/invoice/100

will return 100 ids in the invoice namespace.

Let's have a simple response too. Let's just return an array of ids, like so:

{ "ids": ["id1", "id2", "id3"...]}

I've defined these using Swagger, and uploaded the specification files to the newly created microservice-challenge github project, where you can find them in the specs directory.

In the next post I'll define some BDD scenarios.