Skip to content

Commit cc1c14e

Browse files
committed
Merge branch 'develop' into production
2 parents afd7c99 + 33ef61d commit cc1c14e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+5757
-5100
lines changed

openapi.yaml

Lines changed: 398 additions & 379 deletions
Large diffs are not rendered by default.

openapi/components/schemas/schemas.yml

Lines changed: 367 additions & 368 deletions
Large diffs are not rendered by default.

openapi/paths/v20/apps.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@
1111
schema:
1212
$ref: '#/components/schemas/depenvbyid'
1313
description: 'This returns the information about depositional
14-
environment for selected dataset/collention unit/site.'
14+
environment for selected dataset/collection unit/site.'
1515
tags:
1616
- v2.0
17-
- depositional environment
17+
- depositional environment
18+
x-database-tables:
19+
- sites
20+
- datasets
21+
- collectionunits
22+
- depenvttypes
1823
/v2.0/apps/constdb:
1924
get:
2025
responses:
@@ -32,6 +37,8 @@
3237
- Database metadata
3338
- Summary Informationrmation
3439
- v2.0
40+
x-database-tables:
41+
- constituentdatabases
3542
/v2.0/apps/constdb/datasetages:
3643
get:
3744
parameters:
@@ -48,6 +55,9 @@
4855
- Dataset metadata
4956
- Summary Information
5057
- v2.0
58+
x-database-tables:
59+
- constituentdatabases
60+
- datasets
5161
/v2.0/apps/constdb/datasetuploads:
5262
get:
5363
parameters:
@@ -64,6 +74,9 @@
6474
- Dataset metadata
6575
- Summary Information
6676
- v2.0
77+
x-database-tables:
78+
- datasets
79+
- constituentdatabases
6780
/v2.0/apps/constdb/datasets:
6881
get:
6982
parameters:

openapi/scripts/build-openapi.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const path = require('path');
1212
* is up to date as we develop.
1313
*/
1414
function buildOpenAPI() {
15-
console.log('🔄 Building OpenAPI specification...');
15+
console.log('Building OpenAPI specification...');
1616

1717
// Create the `dist` folder (for distribution) if the
1818
// `dist` folder does not exist.
@@ -56,19 +56,19 @@ function buildOpenAPI() {
5656
// This will give us `useFiles` which tells us which files are associated
5757
// with each section.
5858
Object.keys(toBuild).forEach((key) => {
59-
console.log(`📝 Loading paths for the ${key} section...`);
59+
console.log(`Loading paths for the ${key} section...`);
6060
const outputs = findYamlElements(toBuild[key]).flat();
6161
outputs.forEach((file) => {
62-
console.log(` 📝 Loading paths from ${file}...`);
62+
console.log(`Loading paths from ${file}...`);
6363
try {
6464
const pathSpec = yaml.load(fs.readFileSync(file, 'utf8'));
6565
if (pathSpec && typeof pathSpec === 'object') {
6666
if (key === 'paths') {
6767
Object.assign(mainSpec[key], pathSpec);
68-
console.log(`Added ${Object.keys(pathSpec).length} paths from ${file}`);
68+
console.log(`Added ${Object.keys(pathSpec).length} paths from ${file}`);
6969
} else {
7070
Object.assign(mainSpec.components[key], pathSpec);
71-
console.log(`Added ${Object.keys(pathSpec).length} components from ${file}`);
71+
console.log(`Added ${Object.keys(pathSpec).length} components from ${file}`);
7272
}
7373
}
7474
} catch (error) {

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
"start": "NODE_ENV=production nodemon --legacy-watch app.js",
1515
"test": "node ./node_modules/mocha/bin/mocha --config=test/.mocharc.yml --reporter-options reportDir=public,reportFilename=tests",
1616
"build:openapi": "(cd ./openapi && node ./scripts/build-openapi.js)",
17-
"validate:openapi": "yarn build:openapi && bash genoatt.sh && sleep 2 && bash runmochabatch.sh"
17+
"validate:openapi": "yarn build:openapi && bash genoatt.sh && sleep 4 && bash runmochabatch.sh"
1818
},
1919
"pre-commit": "validate:openapi",
2020
"dependencies": {
2121
"@terraformer/wkt": "^2.2.1",
22-
"acorn": "^6.4.2",
22+
"acorn": "^8.15.0",
2323
"apicache": "^1.6.2",
2424
"axios": "^1.12.0",
2525
"big-json": "^3.2.0",
@@ -37,7 +37,7 @@
3737
"express": "^4.21.2",
3838
"express-rate-limit": "^7.5.1",
3939
"he": "^1.2.0",
40-
"helmet": "^7.2.0",
40+
"helmet": "^8.1.0",
4141
"jade": "^1.11.0",
4242
"js2xmlparser": "^4.0.1",
4343
"morgan": "^1.10.1",
@@ -55,7 +55,7 @@
5555
},
5656
"devDependencies": {
5757
"chai": "^4.3.6",
58-
"chai-openapi-response-validator": "^0.13.0",
58+
"chai-openapi-response-validator": "^0.14.2",
5959
"eslint": "^8.56.0",
6060
"eslint-config-google": "^0.11.0",
6161
"eslint-config-standard": "^12.0.0",

public/tests.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/tests.json

Lines changed: 4651 additions & 4087 deletions
Large diffs are not rendered by default.

test/responsevalidate.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const chai = require('chai');
24
const assert = require('assert');
35
const should = require('chai').should();

test/v1.5-data-contacts-{contactid}-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const expect = chakram.expect;
77
describe('tests for /v1.5/data/contacts/{contactid}', function() {
88
describe('tests for get', function() {
99
it('should respond 200 for "Contact"', function() {
10-
const response = request('get', 'http://localhost:3001/v1.5/data/contacts/500', {
10+
const response = request('get', 'http://localhost:3001/v1.5/data/contacts/-4982637', {
1111
'time': true,
1212
});
1313

test/v1.5-data-geopoliticalunits-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('tests for /v1.5/data/geopoliticalunits', function() {
88
describe('tests for get', function() {
99
it('should respond 200 for "An array of geopolitical units."', function() {
1010
const response = request('get', 'http://localhost:3001/v1.5/data/geopoliticalunits', {
11-
'qs': {'gpid': 5392, 'gpname': 'Canada', 'rank': 3, 'lower': true},
11+
'qs': {'gpid': 5392, 'gpname': 'Canada', 'rank': 1, 'lower': false},
1212
'time': true,
1313
});
1414

0 commit comments

Comments
 (0)