diff --git a/bin/generate-docs b/bin/generate-docs new file mode 100755 index 00000000..5b337e3e --- /dev/null +++ b/bin/generate-docs @@ -0,0 +1,9 @@ +#!/bin/bash -ex + +rm -r docs || true + +curl -s http://localhost:3100/v1 > /dev/null || die "Pelias server does not appear to be running \ +on http://localhost:3100, run npm start in another window before generating docs." + +cd test/ciao +node ../../node_modules/ciao/bin/ciao -c ../ciao.json . -d ../../docs diff --git a/package.json b/package.json index eb9a4b10..e14b4d91 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "ciao": "node node_modules/ciao/bin/ciao -c test/ciao.json test/ciao", "coverage": "node_modules/.bin/istanbul cover test/unit/run.js", "audit": "npm shrinkwrap; node node_modules/nsp/bin/nspCLI.js audit-shrinkwrap; rm npm-shrinkwrap.json;", - "docs": "rm -r docs; cd test/ciao; node ../../node_modules/ciao/bin/ciao -c ../ciao.json . -d ../../docs" + "docs": "./bin/generate-docs" }, "repository": { "type": "git", diff --git a/test/ciao/search/layers_invalid.coffee b/test/ciao/search/layers_invalid.coffee index ec9c58bd..1e8e65fc 100644 --- a/test/ciao/search/layers_invalid.coffee +++ b/test/ciao/search/layers_invalid.coffee @@ -32,5 +32,3 @@ should.not.exist json.geocoding.warnings #? inputs json.geocoding.query['text'].should.eql 'a' json.geocoding.query['size'].should.eql 10 -should.not.exist json.geocoding.query['types'] -should.not.exist json.geocoding.query['type'] diff --git a/test/ciao/search/layers_mix_invalid_valid.coffee b/test/ciao/search/layers_mix_invalid_valid.coffee index fab29ef2..11a40ddc 100644 --- a/test/ciao/search/layers_mix_invalid_valid.coffee +++ b/test/ciao/search/layers_mix_invalid_valid.coffee @@ -32,5 +32,3 @@ should.not.exist json.geocoding.warnings #? inputs json.geocoding.query['text'].should.eql 'a' json.geocoding.query['size'].should.eql 10 -should.not.exist json.geocoding.query['types'] -should.not.exist json.geocoding.query['type'] diff --git a/test/ciao/search/sources_invalid.coffee b/test/ciao/search/sources_invalid.coffee index 2114c9c0..1d8df87c 100644 --- a/test/ciao/search/sources_invalid.coffee +++ b/test/ciao/search/sources_invalid.coffee @@ -32,5 +32,3 @@ should.not.exist json.geocoding.warnings #? inputs json.geocoding.query['text'].should.eql 'a' json.geocoding.query['size'].should.eql 10 -should.not.exist json.geocoding.query['types'] -should.not.exist json.geocoding.query['type']