Skip to content

Commit e520d9a

Browse files
update api docs
1 parent 42e4f5f commit e520d9a

9 files changed

+1601
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const myNorch = new Norch(ops) // same options as terminal
4848
# API
4949

5050
Checkout the OpenAPI documentation
51-
[online](http://fergiemcdowall.github.io/norch/www_root/api.html), or
51+
[online](http://fergiemcdowall.github.io/norch/www_root/api/api.html), or
5252
at [`/api.html`](http://localhost:3030) on your own norch server.
5353

5454

build/mirrorUnpkg.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ Promise.all(
1010
files.map(f =>
1111
fetch('https://unpkg.com/[email protected]/' + f)
1212
.then(res => res.text())
13-
.then(text => writeFile('www_root/' + f, text))
13+
.then(text => writeFile('www_root/api/' + f, text))
1414
)
1515
)

build/openAPIDoc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const swaggerDefinition = {
6363
},
6464
description: 'Describes one or many BUCKETs'
6565
},
66+
6667
Documents: {
6768
in: 'query',
6869
name: 'DOCUMENTS',
@@ -283,7 +284,7 @@ const swaggerDefinition = {
283284
}
284285

285286
writeFileSync(
286-
'www_root/openapi-norch-' + version + '.json',
287+
'www_root/api/openapi-norch-' + version + '.json',
287288
JSON.stringify(
288289
swaggerJsdoc({
289290
swaggerDefinition,

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"node": ">=18"
4242
},
4343
"scripts": {
44-
"build-openapi-docs": "node build/mirrorUnpkg.js && node build/openAPIDoc.js && npm run lint",
44+
"build-openapi-docs": "rm -rf www_root/api && mkdir www_root/api && node build/mirrorUnpkg.js && node build/openAPIDoc.js && npm run lint",
4545
"lint": "standard --fix src build test",
4646
"test": "export SANDBOX=test/sandbox && rm -rf $SANDBOX && mkdir $SANDBOX && date && tape test/*-test.js && npm run lint",
4747
"test-cli": "./bin/norch -p 9090 -i test/sandbox/norch-cli & sleep 5s && bats test/test.bats && kill $!",

0 commit comments

Comments
 (0)