Skip to content

Commit

Permalink
Support NSwag JSON schema types and formats
Browse files Browse the repository at this point in the history
  • Loading branch information
bricelam committed Dec 2, 2024
1 parent 038a22c commit 2902bd8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,11 +554,13 @@ internal static ConnectorType GetConnectorType(this ISwaggerParameter openApiPar
switch (schema.Format)
{
case null:
case "byte":
case "integer":
case "int32":
return new ConnectorType(schema, openApiParameter, FormulaType.Decimal);

case "int64":
case "uint64":
case "unixtime":
return new ConnectorType(schema, openApiParameter, FormulaType.Decimal);

Expand Down Expand Up @@ -615,6 +617,9 @@ internal static ConnectorType GetConnectorType(this ISwaggerParameter openApiPar
return new ConnectorType(error: $"Unsupported type of array ({arrayType.FormulaType._type.ToAnonymousString()})");
}

case "file":
return new ConnectorType(schema, openApiParameter, FormulaType.Blob);

case "object":
case null: // xml

Expand Down

0 comments on commit 2902bd8

Please sign in to comment.