diff --git a/crc/api.yml b/crc/api.yml index 54e84afa..19f06f67 100644 --- a/crc/api.yml +++ b/crc/api.yml @@ -115,10 +115,6 @@ paths: tags: - Studies parameters: - - in: body - name: workflow_spec - schema: - $ref: '#/components/schemas/WorkflowSpec' - name: study_id in: path required: true @@ -126,6 +122,11 @@ paths: schema: type: integer format: int32 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkflowSpec' responses: '200': description: An array of workflows diff --git a/tests/test_api.py b/tests/test_api.py index 2cb6409d..af9b6e1d 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -48,7 +48,8 @@ class TestStudy(BaseTest, unittest.TestCase): self.load_example_data() study = db.session.query(StudyModel).first() spec = db.session.query(WorkflowSpecModel).first() - rv = self.app.post('/v1.0/study/%i/workflows' % study.id, data=WorkflowSpecSchema().dump(spec)) + rv = self.app.post('/v1.0/study/%i/workflows' % study.id,content_type="application/json", + data=json.dumps(WorkflowSpecSchema().dump(spec))) self.assert_success(rv)