Identifies (media) type of API description files
npm install deckardcain
"As a token of my gratitude, I will identify items for you at no charge."
Deckard Cain library identifies (media) type of API description files.
- API Blueprint - text/vnd.apiblueprint
- Legacy Apiary Blueprint (predecessor of API Blueprint) - text/vnd.legacyblueprint
- Swagger - application/swagger+json (according to swagger-api/swagger-spec#110) and application/swagger+yaml
- API Description Namespace - application/vnd.refract.api-description+json and application/vnd.refract.api-description+yaml
```
npm install deckardcain
`javascript
import {identify} from 'deckardcain';
identify(
HOST: http://example.com
--- API Name ---
All Messages
GET /messages
< 200) // 'text/vnd.legacyblueprint'
identify(
FORMAT: 1A
HOST: http://example.com
#### Read [GET]
+ Response 200 (text/plain)) // 'text/vnd.apiblueprint'`
Please mind the library is written in ECMAScript 6.
``
git clone https://github.com/apiaryio/deckardcain
cd deckardcain
npm install
``
npm test
See also the .travis.yml file.
Source code is located in the ./src folder and gets automatically transpiled into ./lib folder when npm install or npm publish is invoked. However, should you need to transpile it manually, use npm run compile`.
Deckard Cain library pays tribute to a fictional character from Diablo video game series. In Diablo II, Deckard Cain provides his wisdom and identifies items for free after being rescued by the player.