0

I'd like to have an API documentation segmented per version of the API. So my host is: http://api.clementlevallois.net/apitest/

The api version is: v1

The resource is: get/{id}

And I'd like the doc to generate:

http://api.clementlevallois.net/apitest/v1/get/{id}

But the "v1" part is squeezed and I just get: http://api.clementlevallois.net/apitest/get/{id}

Here is my markdown:

FORMAT: 1A
HOST: http://api.clementlevallois.net/apitest/


# API Test

"ApiTest" is a simple API I created to learn for myself how to create, publish and document APIs.

At the moment it is very basic:
type: http://api.clementlevallois.net/apitest/v1/get/YOUR NAME HERE

And check what it returns.

## Version 1 [/v1/]
Resource representing *the version 1* of the API.

### Request a greeting [GET /get/{username}]

+ Parameters
    + username (text, required) - The name that will be greeted.


+ Response 200 (application/json)

        {"username":"username"}

How can I get the "v1" part inserted in the URI?

seinecle
  • 10,118
  • 14
  • 61
  • 120
  • Maybe this could be helpful: http://stackoverflow.com/questions/32419425/does-apiary-io-and-or-api-blueprint-support-api-versioning – tomjcz Dec 18 '15 at 12:25
  • indeed, thank you. Versioning is one best practice of designing apis and this should probably be taken into consideration in the doc: different blueprints for different versions of the same api does not sound right. – seinecle Dec 19 '15 at 00:26

1 Answers1

0

If the blueprint is about v1 only, it's inherently part of where it's location, therefore it should be included in HOST:

HOST: http://api.clementlevallois.net/apitest/v1/

Almad
  • 5,753
  • 7
  • 35
  • 53