Skip to content

Commit a8570a9

Browse files
committed
Updating schema changes to the API.
Minor fix to the API schema to help some of the tests pass. Mostly just improving definitions to broaden variables.
1 parent afd7c99 commit a8570a9

39 files changed

+5690
-5673
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
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": {

public/tests.html

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

0 commit comments

Comments
 (0)