Skip to content

Commit 9e9cc95

Browse files
authored
Let frontend return 'number' instead of 'float' for the func schema 🐛 (#7726)
1 parent 1a9b912 commit 9e9cc95

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

services/static-webserver/client/source/class/osparc/study/CreateFunction.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,6 @@ qx.Class.define("osparc.study.CreateFunction", {
3333
},
3434

3535
statics: {
36-
typeToFunctionType: function(type) {
37-
switch (type) {
38-
case "number":
39-
return "float"
40-
case "data:*/*":
41-
return "FileID"
42-
}
43-
return type;
44-
},
45-
4636
createFunctionData: function(projectData, name, description, exposedInputs, exposedOutputs) {
4737
const functionData = {
4838
"projectId": projectData["uuid"],
@@ -74,7 +64,7 @@ qx.Class.define("osparc.study.CreateFunction", {
7464
if (parameterMetadata) {
7565
const type = osparc.service.Utils.getParameterType(parameterMetadata);
7666
functionData["inputSchema"]["schema_content"]["properties"][parameterLabel] = {
77-
"type": this.self().typeToFunctionType(type),
67+
"type": type,
7868
};
7969
}
8070
} else {
@@ -90,7 +80,7 @@ qx.Class.define("osparc.study.CreateFunction", {
9080
if (probeMetadata) {
9181
const type = osparc.service.Utils.getProbeType(probeMetadata);
9282
functionData["outputSchema"]["schema_content"]["properties"][probeLabel] = {
93-
"type": this.self().typeToFunctionType(type),
83+
"type": type,
9484
};
9585
}
9686
}

0 commit comments

Comments
 (0)