Skip to content

Commit afef3af

Browse files
committed
Regex check for model name
1 parent 5cd554d commit afef3af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/well-knowns.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ const wellKnowns = {
332332
const AIPlugin = {};
333333
AIPlugin.schema_version = 'v1';
334334
AIPlugin.name_for_human = plugin.name.slice(0, 20);
335-
AIPlugin.name_for_model = plugin.forModel.name.slice(0, 50);
335+
AIPlugin.name_for_model = plugin.forModel.name.slice(0, 50).replace(/[^A-Z0-9_]+/gi, '_');
336336
AIPlugin.description_for_human = plugin.description.slice(0, 100);
337337
AIPlugin.description_for_model = plugin.forModel.description.slice(0, 8000);
338338
AIPlugin.auth = {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "functionscript",
3-
"version": "2.10.1",
3+
"version": "2.10.2",
44
"description": "An API gateway and framework for turning functions into web services",
55
"author": "Keith Horwood <keithwhor@gmail.com>",
66
"main": "index.js",

0 commit comments

Comments
 (0)