Skip to content

Commit

Permalink
fix: Fixed bug with OpenApi31Support for json exclusiveMinMax.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Nov 6, 2024
1 parent 84b9d9f commit a27a94d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/libs/AutoSDK/Helpers/OpenApi31Support.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,14 @@ v is JsonObject objects &&
node["nullable"] = true;
}

if (keyString == "exclusiveMinimum" && entry.Value is not JsonValue)
if (keyString == "exclusiveMinimum")
{
node["minimum"] = entry.Value;
node["minimum"] = entry.Value?.DeepClone();
node["exclusiveMinimum"] = true;
}

if (keyString == "exclusiveMaximum" && entry.Value is not JsonValue)
if (keyString == "exclusiveMaximum")
{
node["maximum"] = entry.Value;
node["maximum"] = entry.Value?.DeepClone();
node["exclusiveMaximum"] = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4334,9 +4334,10 @@
"top_p": {
"type": "number",
"maximum": 1.0,
"minimum": 0.0,
"exclusiveMinimum": true,
"title": "Top P",
"default": 1
"default": 1,
"minimum": 0.0
},
"stop": {
"anyOf": [
Expand Down

0 comments on commit a27a94d

Please sign in to comment.