Skip to content

Commit

Permalink
Add extras to result
Browse files Browse the repository at this point in the history
  • Loading branch information
langdal committed Jun 17, 2021
1 parent 7465e40 commit 0526a7e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
8 changes: 8 additions & 0 deletions openapi/models/ResultResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ export interface ResultResult {
* @memberof ResultResult
*/
next?: Array<number>;
/**
*
* @type {object}
* @memberof ResultResult
*/
extras?: object;
}

export function ResultResultFromJSON(json: any): ResultResult {
Expand All @@ -45,6 +51,7 @@ export function ResultResultFromJSONTyped(json: any, ignoreDiscriminator: boolea

'pickled': !exists(json, 'pickled') ? undefined : json['pickled'],
'next': !exists(json, 'next') ? undefined : json['next'],
'extras': !exists(json, 'extras') ? undefined : json['extras'],
};
}

Expand All @@ -59,6 +66,7 @@ export function ResultResultToJSON(value?: ResultResult | null): any {

'pickled': value.pickled,
'next': value.next,
'extras': value.extras,
};
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "next build",
"start": "next start",
"test": "jest",
"openapi": "openapi-generator-cli generate --skip-validate-spec -i https://raw.githubusercontent.com/BoostV/process-optimizer-api/v1.0.0/optimizerapi/openapi/specification.yml -g typescript-fetch -o ./openapi"
"openapi": "openapi-generator-cli generate --skip-validate-spec -i https://raw.githubusercontent.com/BoostV/process-optimizer-api/v1.0.1/optimizerapi/openapi/specification.yml -g typescript-fetch -o ./openapi"
},
"dependencies": {
"@material-ui/core": "^4.11.3",
Expand Down
3 changes: 2 additions & 1 deletion pages/api/experiment/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ export default async (req: NextApiRequest, res: NextApiResponse<ExperimentType|E
id: experiment.id,
plots: json.plots && json.plots.map(p => { return {id: p.id, plot: p.plot}}),
next: json.result.next,
pickled: json.result.pickled
pickled: json.result.pickled,
extras: json.result.extras
}
res.json(result)
break
Expand Down
4 changes: 3 additions & 1 deletion reducers/reducers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ describe("experiment reducer", () => {
id: "123",
next: [],
plots: [],
pickled: "123"
pickled: "123",
extras: {}
},
dataPoints: []
}
Expand Down Expand Up @@ -235,6 +236,7 @@ describe("experiment reducer", () => {
id: "myExperiment",
next: [1,2,3,"Red"],
pickled: "pickled",
extras: {},
plots: [{id: "sample", plot: "base64encodedData"}]
}

Expand Down
3 changes: 2 additions & 1 deletion store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const emptyExperiment: ExperimentType = {
id: "",
next: [],
plots: [],
pickled: ""
pickled: "",
extras: {}
},
dataPoints: []
}
Expand Down
3 changes: 2 additions & 1 deletion types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export type ExperimentResultType = {
id: string
plots: {id: string, plot: string}[]
next: (number|string)[],
pickled: string
pickled: string,
extras: object
}

export type Info = {
Expand Down

0 comments on commit 0526a7e

Please sign in to comment.