diff --git a/Directory.Build.props b/Directory.Build.props index b89cfa1..e065ef6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 2.7.0 + 2.8.0 11.0 enable enable @@ -33,7 +33,7 @@ - 2.10.1 + 2.11.0 diff --git a/ReleaseNotes.md b/ReleaseNotes.md index f112455..41ef3ba 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,5 +1,9 @@ # Release Notes +## 2.8.0 + +* Support `datetime`. + ## 2.7.0 * Support `extern` data and enum types. diff --git a/conformance/ConformanceApi.fsd b/conformance/ConformanceApi.fsd index e51d494..ff35857 100644 --- a/conformance/ConformanceApi.fsd +++ b/conformance/ConformanceApi.fsd @@ -149,14 +149,13 @@ service ConformanceApi int32: int32; int64: int64; decimal: decimal; - - [validate] - enum: Answer; + [validate] enum: Answer; + datetime: datetime; }: { } - [http(method: GET, path: "/checkPath/{string}/{boolean}/{double}/{int32}/{int64}/{decimal}/{enum}")] + [http(method: GET, path: "/checkPath/{string}/{boolean}/{double}/{int32}/{int64}/{decimal}/{enum}/{datetime}")] method checkPath { string: string; @@ -165,9 +164,8 @@ service ConformanceApi int32: int32; int64: int64; decimal: decimal; - - [validate] - enum: Answer; + [validate] enum: Answer; + datetime: datetime; }: { } @@ -182,6 +180,7 @@ service ConformanceApi [http(from: header)] int64: int64; [http(from: header)] decimal: decimal; [http(from: header)] enum: Answer; + [http(from: header)] datetime: datetime; }: { [http(from: header)] string: string; @@ -191,6 +190,7 @@ service ConformanceApi [http(from: header)] int64: int64; [http(from: header)] decimal: decimal; [http(from: header)] enum: Answer; + [http(from: header)] datetime: datetime; } [http(path: "/mixed/{path}")] @@ -261,6 +261,7 @@ service ConformanceApi int32: int32; int64: int64; decimal: decimal; + datetime: datetime; bytes: bytes; object: object; error: error; @@ -280,6 +281,7 @@ service ConformanceApi int32: int32[]; int64: int64[]; decimal: decimal[]; + datetime: datetime[]; bytes: bytes[]; object: object[]; error: error[]; @@ -299,6 +301,7 @@ service ConformanceApi int32: map; int64: map; decimal: map; + datetime: map; bytes: map; object: map; error: map; @@ -318,6 +321,7 @@ service ConformanceApi int32: result; int64: result; decimal: result; + datetime: result; bytes: result; object: result; error: result; @@ -337,6 +341,7 @@ service ConformanceApi int32: nullable; int64: nullable; decimal: nullable; + datetime: nullable; bytes: nullable; object: nullable; error: nullable; diff --git a/conformance/http/ConformanceApi.md b/conformance/http/ConformanceApi.md index eb48259..b28641c 100644 --- a/conformance/http/ConformanceApi.md +++ b/conformance/http/ConformanceApi.md @@ -12,7 +12,7 @@ API for a Facility test server. | [getWidgetBatch](ConformanceApi/getWidgetBatch.md) | `POST /widgets/get` | Gets the specified widgets. | | [mirrorFields](ConformanceApi/mirrorFields.md) | `POST /mirrorFields` | | | [checkQuery](ConformanceApi/checkQuery.md) | `GET /checkQuery` | | -| [checkPath](ConformanceApi/checkPath.md) | `GET /checkPath/{string}/{boolean}/{double}/{int32}/{int64}/{decimal}/{enum}` | | +| [checkPath](ConformanceApi/checkPath.md) | `GET /checkPath/{string}/{boolean}/{double}/{int32}/{int64}/{decimal}/{enum}/{datetime}` | | | [mirrorHeaders](ConformanceApi/mirrorHeaders.md) | `GET /mirrorHeaders` | | | [mixed](ConformanceApi/mixed.md) | `POST /mixed/{path}` | | | [required](ConformanceApi/required.md) | `POST /required` | | diff --git a/conformance/http/ConformanceApi/Any.md b/conformance/http/ConformanceApi/Any.md index c044b98..d548150 100644 --- a/conformance/http/ConformanceApi/Any.md +++ b/conformance/http/ConformanceApi/Any.md @@ -8,6 +8,7 @@ "int32": (integer), "int64": (integer), "decimal": (number), + "datetime": "(date/time)", "bytes": "(base64)", "object": { ... }, "error": { "code": ... }, @@ -28,6 +29,7 @@ | int32 | int32 | | | int64 | int64 | | | decimal | decimal | | +| datetime | datetime | | | bytes | bytes | | | object | object | | | error | error | | diff --git a/conformance/http/ConformanceApi/AnyArray.md b/conformance/http/ConformanceApi/AnyArray.md index ed59c3e..373adc3 100644 --- a/conformance/http/ConformanceApi/AnyArray.md +++ b/conformance/http/ConformanceApi/AnyArray.md @@ -8,6 +8,7 @@ "int32": [ (integer), ... ], "int64": [ (integer), ... ], "decimal": [ (number), ... ], + "datetime": [ "(date/time)", ... ], "bytes": [ "(base64)", ... ], "object": [ { ... }, ... ], "error": [ { "code": ... }, ... ], @@ -28,6 +29,7 @@ | int32 | int32[] | | | int64 | int64[] | | | decimal | decimal[] | | +| datetime | datetime[] | | | bytes | bytes[] | | | object | object[] | | | error | error[] | | diff --git a/conformance/http/ConformanceApi/AnyMap.md b/conformance/http/ConformanceApi/AnyMap.md index 5aff939..f752e72 100644 --- a/conformance/http/ConformanceApi/AnyMap.md +++ b/conformance/http/ConformanceApi/AnyMap.md @@ -8,6 +8,7 @@ "int32": { "...": (integer), ... }, "int64": { "...": (integer), ... }, "decimal": { "...": (number), ... }, + "datetime": { "...": "(date/time)", ... }, "bytes": { "...": "(base64)", ... }, "object": { "...": { ... }, ... }, "error": { "...": { "code": ... }, ... }, @@ -28,6 +29,7 @@ | int32 | map | | | int64 | map | | | decimal | map | | +| datetime | map | | | bytes | map | | | object | map | | | error | map | | diff --git a/conformance/http/ConformanceApi/AnyNullable.md b/conformance/http/ConformanceApi/AnyNullable.md index a0f21c3..aba692b 100644 --- a/conformance/http/ConformanceApi/AnyNullable.md +++ b/conformance/http/ConformanceApi/AnyNullable.md @@ -8,6 +8,7 @@ "int32": (integer) | null, "int64": (integer) | null, "decimal": (number) | null, + "datetime": "(date/time)" | null, "bytes": "(base64)" | null, "object": { ... } | null, "error": { "code": ... } | null, @@ -27,6 +28,7 @@ | int32 | nullable | | | int64 | nullable | | | decimal | nullable | | +| datetime | nullable | | | bytes | nullable | | | object | nullable | | | error | nullable | | diff --git a/conformance/http/ConformanceApi/AnyResult.md b/conformance/http/ConformanceApi/AnyResult.md index 1aed0be..2ab96d9 100644 --- a/conformance/http/ConformanceApi/AnyResult.md +++ b/conformance/http/ConformanceApi/AnyResult.md @@ -8,6 +8,7 @@ "int32": { "value": (integer) | "error": { "code": ... } }, "int64": { "value": (integer) | "error": { "code": ... } }, "decimal": { "value": (number) | "error": { "code": ... } }, + "datetime": { "value": "(date/time)" | "error": { "code": ... } }, "bytes": { "value": "(base64)" | "error": { "code": ... } }, "object": { "value": { ... } | "error": { "code": ... } }, "error": { "value": { "code": ... } | "error": { "code": ... } }, @@ -28,6 +29,7 @@ | int32 | result | | | int64 | result | | | decimal | result | | +| datetime | result | | | bytes | result | | | object | result | | | error | result | | diff --git a/conformance/http/ConformanceApi/checkPath.md b/conformance/http/ConformanceApi/checkPath.md index b9ff030..16f919d 100644 --- a/conformance/http/ConformanceApi/checkPath.md +++ b/conformance/http/ConformanceApi/checkPath.md @@ -1,7 +1,7 @@ # checkPath ``` -GET /checkPath/{string}/{boolean}/{double}/{int32}/{int64}/{decimal}/{enum} +GET /checkPath/{string}/{boolean}/{double}/{int32}/{int64}/{decimal}/{enum}/{datetime} --- 200 OK ``` @@ -14,5 +14,6 @@ GET /checkPath/{string}/{boolean}/{double}/{int32}/{int64}/{decimal}/{enum} | int64 | int64 | | | decimal | decimal | | | enum | [Answer](Answer.md) | | +| datetime | datetime | | diff --git a/conformance/http/ConformanceApi/checkQuery.md b/conformance/http/ConformanceApi/checkQuery.md index f45acde..11c001e 100644 --- a/conformance/http/ConformanceApi/checkQuery.md +++ b/conformance/http/ConformanceApi/checkQuery.md @@ -9,6 +9,7 @@ GET /checkQuery &int64={int64} &decimal={decimal} &enum={enum} + &datetime={datetime} --- 200 OK ``` @@ -21,5 +22,6 @@ GET /checkQuery | int64 | int64 | | | decimal | decimal | | | enum | [Answer](Answer.md) | | +| datetime | datetime | | diff --git a/conformance/http/ConformanceApi/mirrorHeaders.md b/conformance/http/ConformanceApi/mirrorHeaders.md index 0f99bbf..5ed4c75 100644 --- a/conformance/http/ConformanceApi/mirrorHeaders.md +++ b/conformance/http/ConformanceApi/mirrorHeaders.md @@ -9,6 +9,7 @@ int32: (int32) int64: (int64) decimal: (decimal) enum: (enum) +datetime: (datetime) --- response string: (string) boolean: (boolean) @@ -17,6 +18,7 @@ int32: (int32) int64: (int64) decimal: (decimal) enum: (enum) +datetime: (datetime) --- 200 OK ``` @@ -29,6 +31,7 @@ enum: (enum) | int64 | int64 | | | decimal | decimal | | | enum | [Answer](Answer.md) | | +| datetime | datetime | | | response | type | description | | --- | --- | --- | @@ -39,5 +42,6 @@ enum: (enum) | int64 | int64 | | | decimal | decimal | | | enum | [Answer](Answer.md) | | +| datetime | datetime | | diff --git a/conformance/no-http/ConformanceApi/Any.md b/conformance/no-http/ConformanceApi/Any.md index 3befac8..617b02d 100644 --- a/conformance/no-http/ConformanceApi/Any.md +++ b/conformance/no-http/ConformanceApi/Any.md @@ -8,6 +8,7 @@ | int32 | int32 | | | int64 | int64 | | | decimal | decimal | | +| datetime | datetime | | | bytes | bytes | | | object | object | | | error | error | | diff --git a/conformance/no-http/ConformanceApi/AnyArray.md b/conformance/no-http/ConformanceApi/AnyArray.md index abfb53f..0c04897 100644 --- a/conformance/no-http/ConformanceApi/AnyArray.md +++ b/conformance/no-http/ConformanceApi/AnyArray.md @@ -8,6 +8,7 @@ | int32 | int32[] | | | int64 | int64[] | | | decimal | decimal[] | | +| datetime | datetime[] | | | bytes | bytes[] | | | object | object[] | | | error | error[] | | diff --git a/conformance/no-http/ConformanceApi/AnyMap.md b/conformance/no-http/ConformanceApi/AnyMap.md index 0069714..e04199b 100644 --- a/conformance/no-http/ConformanceApi/AnyMap.md +++ b/conformance/no-http/ConformanceApi/AnyMap.md @@ -8,6 +8,7 @@ | int32 | map | | | int64 | map | | | decimal | map | | +| datetime | map | | | bytes | map | | | object | map | | | error | map | | diff --git a/conformance/no-http/ConformanceApi/AnyNullable.md b/conformance/no-http/ConformanceApi/AnyNullable.md index 0aab4c1..e43ba31 100644 --- a/conformance/no-http/ConformanceApi/AnyNullable.md +++ b/conformance/no-http/ConformanceApi/AnyNullable.md @@ -8,6 +8,7 @@ | int32 | nullable | | | int64 | nullable | | | decimal | nullable | | +| datetime | nullable | | | bytes | nullable | | | object | nullable | | | error | nullable | | diff --git a/conformance/no-http/ConformanceApi/AnyResult.md b/conformance/no-http/ConformanceApi/AnyResult.md index d832800..1624d90 100644 --- a/conformance/no-http/ConformanceApi/AnyResult.md +++ b/conformance/no-http/ConformanceApi/AnyResult.md @@ -8,6 +8,7 @@ | int32 | result | | | int64 | result | | | decimal | result | | +| datetime | result | | | bytes | result | | | object | result | | | error | result | | diff --git a/conformance/no-http/ConformanceApi/checkPath.md b/conformance/no-http/ConformanceApi/checkPath.md index e35a851..c2cf8a0 100644 --- a/conformance/no-http/ConformanceApi/checkPath.md +++ b/conformance/no-http/ConformanceApi/checkPath.md @@ -9,5 +9,6 @@ | int64 | int64 | | | decimal | decimal | | | enum | [Answer](Answer.md) | | +| datetime | datetime | | diff --git a/conformance/no-http/ConformanceApi/checkQuery.md b/conformance/no-http/ConformanceApi/checkQuery.md index ef066a0..60236ae 100644 --- a/conformance/no-http/ConformanceApi/checkQuery.md +++ b/conformance/no-http/ConformanceApi/checkQuery.md @@ -9,5 +9,6 @@ | int64 | int64 | | | decimal | decimal | | | enum | [Answer](Answer.md) | | +| datetime | datetime | | diff --git a/conformance/no-http/ConformanceApi/mirrorHeaders.md b/conformance/no-http/ConformanceApi/mirrorHeaders.md index aab36e9..2438bac 100644 --- a/conformance/no-http/ConformanceApi/mirrorHeaders.md +++ b/conformance/no-http/ConformanceApi/mirrorHeaders.md @@ -9,6 +9,7 @@ | int64 | int64 | | | decimal | decimal | | | enum | [Answer](Answer.md) | | +| datetime | datetime | | | response | type | description | | --- | --- | --- | @@ -19,5 +20,6 @@ | int64 | int64 | | | decimal | decimal | | | enum | [Answer](Answer.md) | | +| datetime | datetime | | diff --git a/dotnet-tools.json b/dotnet-tools.json index 8e16642..9562684 100644 --- a/dotnet-tools.json +++ b/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "facilityconformance": { - "version": "2.19.0", + "version": "2.21.0", "commands": [ "FacilityConformance" ] diff --git a/src/Facility.CodeGen.Markdown/MarkdownGeneratorGlobals.cs b/src/Facility.CodeGen.Markdown/MarkdownGeneratorGlobals.cs index 345eb17..f9d4561 100644 --- a/src/Facility.CodeGen.Markdown/MarkdownGeneratorGlobals.cs +++ b/src/Facility.CodeGen.Markdown/MarkdownGeneratorGlobals.cs @@ -36,6 +36,7 @@ public static string RenderFieldType(ServiceTypeInfo typeInfo) => ServiceTypeKind.Int64 => "int64", ServiceTypeKind.Decimal => "decimal", ServiceTypeKind.Bytes => "bytes", + ServiceTypeKind.DateTime => "datetime", ServiceTypeKind.Object => "object", ServiceTypeKind.Error => "error", ServiceTypeKind.Dto => $"[{typeInfo.Dto!.Name}]({typeInfo.Dto.Name}.md)", @@ -59,6 +60,7 @@ public static string RenderFieldTypeAsJsonValue(ServiceTypeInfo typeInfo) => ServiceTypeKind.Int32 => "(integer)", ServiceTypeKind.Int64 => "(integer)", ServiceTypeKind.Bytes => "\"(base64)\"", + ServiceTypeKind.DateTime => "\"(date/time)\"", ServiceTypeKind.Object => "{ ... }", ServiceTypeKind.Error => "{ \"code\": ... }", ServiceTypeKind.Dto => RenderDtoAsJsonValue(typeInfo.Dto!),