diff --git a/api/dataset.go b/api/dataset.go index d3373fcb..e9b249c1 100644 --- a/api/dataset.go +++ b/api/dataset.go @@ -623,7 +623,7 @@ func (api *DatasetAPI) addDatasetVersionCondensed(w http.ResponseWriter, r *http newInstance, err := instance.UnmarshalInstance(ctx, r.Body, true) if err != nil { log.Error(ctx, "failed to unmarshal instance", err, logData) - handleDatasetAPIErr(ctx, errs.ErrInvalidQueryParameter, w, nil) + handleDatasetAPIErr(ctx, errs.ErrInvalidBody, w, nil) return } diff --git a/api/dataset_test.go b/api/dataset_test.go index d9ae0253..bb5d2348 100644 --- a/api/dataset_test.go +++ b/api/dataset_test.go @@ -1754,6 +1754,6 @@ func TestAddDatasetVersionCondensed(t *testing.T) { api := GetAPIWithCMDMocks(mockedDataStore, &mocks.DownloadsGeneratorMock{}, datasetPermissions, permissions) api.addDatasetVersionCondensed(w, r) - convey.So(w.Code, convey.ShouldEqual, http.StatusBadRequest) + convey.So(w.Code, convey.ShouldEqual, http.StatusInternalServerError) }) } diff --git a/swagger.yaml b/swagger.yaml index bfb7336e..36f2b088 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -2535,6 +2535,8 @@ definitions: $ref: '#/definitions/SelfLink' spatial: $ref: '#/definitions/SpatialLink' + job: + $ref: '#/definitions/JobLink' DatasetLink: description: "An object containing the dataset id and link" readOnly: true @@ -2599,6 +2601,15 @@ definitions: href: description: "A url to a list of geography ranges for the version of the dataset" type: string + JobLink: + type: object + properties: + href: + description: "A URL to list dimensions for this version" + type: string + id: + description: "A Job id" + type: string TaxonomyLink: description: "A link to the taxonomy of the dataset" type: object