Skip to content
Snippets Groups Projects
Commit 17d651c3 authored by Justin Ehlert's avatar Justin Ehlert
Browse files

Update schemas for analyses in SDK

This update forces us to use the inflated job for single analysis end points.
parent ff9a3294
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,10 @@
"oneOf":[
{"$ref":"common.json#/definitions/objectid"},
{"$ref": "job.json#/definitions/job-output"}
]
],
"x-sdk-schema": {
"$ref": "job.json#/definitions/job-output"
}
},
"notes": {"$ref":"note.json#/definitions/notes-list-output"},
"description": {"$ref":"common.json#/definitions/description"},
......
......@@ -122,6 +122,11 @@ module.exports = function(grunt) {
// returns a simplified version of schema
function simplifySchema(schema, path, context) {
schema = _.cloneDeep(schema);
// If an x-sdk-schema is specified, use that
if( schema['x-sdk-schema'] ) {
schema = schema['x-sdk-schema'];
}
if( !isValidSchema(schema) ) {
grunt.log.writeln('WARNING '.red + 'Invalid schema (no object type specified) at: ' + formatPath(path));
schema.type = 'object';
......
......@@ -52,6 +52,7 @@ template: |
in: query
type: boolean
description: Return job as an object instead of an id
x-sdk-default: 'true'
responses:
'200':
description: Returns the id of the analysis that was created.
......
......@@ -36,6 +36,7 @@ template: |
in: query
type: boolean
description: Return job as an object instead of an id
x-sdk-default: 'true'
responses:
'200':
description: ''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment