Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Cassidy <steve.cassidy@mq.edu.au>
  • Loading branch information
stevecassidy committed Nov 2, 2023
1 parent 86076f0 commit 9061484
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 8 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ npm run load-notebooks

## Deploying a notebook

* Set USER_TOKEN in bash `export USER_TOKEN=blah` (from token export in conductor)
* Set public_url `export CONDUCTOR_PUBLIC_URL=https://conductor.fieldmark.app`
* Delete all unwanted tokens from the notebooks folder, then load desired notebook and run `npm run load-notebooks`
* Otherwise, set up environment and `node scripts/loadNotebooks.js path/to/notebook.json`
Notebooks can be uploaded to Conductor via the web interface.

## Development

Expand All @@ -119,7 +116,6 @@ Then start the services:
docker compose -f docker-compose.dev.yml up
```


## Tests

Run tests inside the conductor instance:
Expand Down
79 changes: 76 additions & 3 deletions public/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@
},
"put": {
"summary": "Update a notebook",
"description": "Update a notebook by id",
"description": "Update a notebook by identifier",
"tags": ["Notebooks"],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Notebook id",
"description": "Notebook identifier",
"required": true,
"type": "string"
}
Expand Down Expand Up @@ -173,7 +173,7 @@
{
"name": "id",
"in": "path",
"description": "Notebook id",
"description": "Notebook identifier",
"required": true,
"type": "string"
}
Expand All @@ -196,6 +196,79 @@
}
}
},
"/notebooks/{id}/{viewID}.csv": {
"get": {
"summary": "Get a records as CSV",
"description": "Export notebook records as CSV for one form",
"tags": ["Export"],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Notebook identifier",
"required": true,
"type": "string"
},
{
"name": "viewID",
"in": "path",
"description": "view (form) dentifier",
"required": true,
"type": "string"
}
],
"produces": ["text/csv"],
"security": {"Auth": []},
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "string"
}
},
"401": {
"$ref": "#/components/responses/UnauthorizedError"
}
}
}
},
"/notebooks/{id}/{viewID}.zip": {
"get": {
"summary": "Get all record attachments as a zip file",
"description": "Export all attachments (photos, files) for a form as a zip file",
"tags": ["Export"],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Notebook id",
"required": true,
"type": "string"
},
{
"name": "viewID",
"in": "path",
"description": "view (form) dentifier",
"required": true,
"type": "string"
}
],
"produces": ["application/zip"],
"security": {"Auth": []},
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "string",
"format": "binary"
}
},
"401": {
"$ref": "#/components/responses/UnauthorizedError"
}
}
}
},
"/notebooks/{id}/users": {
"get": {
"summary": "Get users for a notebook",
Expand Down

0 comments on commit 9061484

Please sign in to comment.