Closed IvanGoncharov closed 6 years ago
Do you have a test framework or continuous integration service (e.g. travis) in mind for this?
@MikeRalphson EDIT: Sorry, confused bugs. Read title of issue 53 and your response in this one :) ~~It would be great to have something like that. Even to make single request per API already test a lot of stuff: host, basePath, securityDefinitions, etc. But significantly bigger effort than to fix Watson API. I gladly accept any help with both generic test system and Watson APIs.~~
@MikeRalphson On every commit, I run Tavis and it creates deploy
dir and push it to gh-pages
branch.
You can see an entire process by running npm install
and scripts/deploy.sh
from the root of my repo.
So on the next step, it would be cool to run validation script.
It could be anything, but I personally worked only with mocha+chai so it's preferred option.
Also, for chai there is plugin to validate against JSON Schema:
https://github.com/Bartvds/chai-json-schema
Looking to use dredd. Waiting on https://github.com/apiaryio/dredd/issues/553
May need to explicitly set the produces
content-type to application/json
; charset: utf8
Testing with dredd working now. externalDocs
property added to API definition response model.
Test according to https://github.com/APIs-guru/api-models/blob/master/API.md Basically, test content of this file https://apis-guru.github.io/api-models/api/v1/list.json Preferably implemented as JSON Schema validation, JSON Schema could be extracted from here: https://github.com/APIs-guru/api-models/blob/master/scripts/apis_guru_swagger.yaml
If you want to help write here and I will provide more details.