Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 4 Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>

<PropertyGroup>
<VersionPrefix>3.1.0</VersionPrefix>
<PackageValidationBaselineVersion>3.0.0</PackageValidationBaselineVersion>
<VersionPrefix>3.2.0</VersionPrefix>
<PackageValidationBaselineVersion>3.1.0</PackageValidationBaselineVersion>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
4 changes: 2 additions & 2 deletions 4 Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Facility.CodeGen.Console" Version="2.15.0" />
<PackageVersion Include="Facility.Definition" Version="2.15.0" />
<PackageVersion Include="Facility.CodeGen.Console" Version="2.16.0" />
<PackageVersion Include="Facility.Definition" Version="2.16.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="NUnit" Version="4.1.0" />
Expand Down
4 changes: 4 additions & 0 deletions 4 ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

These are the NuGet package releases. See also [npm Release Notes](ReleaseNotesNpm.md).

## 3.2.0

* Support `float` field type.

## 3.1.0

* Drop support for end-of-life frameworks.
Expand Down
11 changes: 10 additions & 1 deletion 11 conformance/ConformanceApi.fsd
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ service ConformanceApi
{
string: string;
boolean: boolean;
float: float;
double: double;
int32: int32;
int64: int64;
Expand All @@ -155,11 +156,12 @@ service ConformanceApi
{
}

[http(method: GET, path: "/checkPath/{string}/{boolean}/{double}/{int32}/{int64}/{decimal}/{enum}/{datetime}")]
[http(method: GET, path: "/checkPath/{string}/{boolean}/{float}/{double}/{int32}/{int64}/{decimal}/{enum}/{datetime}")]
method checkPath
{
string: string;
boolean: boolean;
float: float;
double: double;
int32: int32;
int64: int64;
Expand All @@ -175,6 +177,7 @@ service ConformanceApi
{
[http(from: header)] string: string;
[http(from: header)] boolean: boolean;
[http(from: header)] float: float;
[http(from: header)] double: double;
[http(from: header)] int32: int32;
[http(from: header)] int64: int64;
Expand All @@ -185,6 +188,7 @@ service ConformanceApi
{
[http(from: header)] string: string;
[http(from: header)] boolean: boolean;
[http(from: header)] float: float;
[http(from: header)] double: double;
[http(from: header)] int32: int32;
[http(from: header)] int64: int64;
Expand Down Expand Up @@ -266,6 +270,7 @@ service ConformanceApi
{
string: string;
boolean: boolean;
float: float;
double: double;
int32: int32;
int64: int64;
Expand All @@ -286,6 +291,7 @@ service ConformanceApi
{
string: string[];
boolean: boolean[];
float: float[];
double: double[];
int32: int32[];
int64: int64[];
Expand All @@ -306,6 +312,7 @@ service ConformanceApi
{
string: map<string>;
boolean: map<boolean>;
float: map<float>;
double: map<double>;
int32: map<int32>;
int64: map<int64>;
Expand All @@ -326,6 +333,7 @@ service ConformanceApi
{
string: result<string>;
boolean: result<boolean>;
float: result<float>;
double: result<double>;
int32: result<int32>;
int64: result<int64>;
Expand All @@ -346,6 +354,7 @@ service ConformanceApi
{
string: nullable<string>;
boolean: nullable<boolean>;
float: nullable<float>;
double: nullable<double>;
int32: nullable<int32>;
int64: nullable<int64>;
Expand Down
30 changes: 26 additions & 4 deletions 30 conformance/ConformanceTests.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"request": {
"string": "string",
"boolean": true,
"float": 0.1875,
"double": 0.375,
"int32": 42,
"int64": 12345678910,
Expand All @@ -21,6 +22,7 @@
"request": {
"string": "string",
"boolean": true,
"float": 0.1875,
"double": 0.375,
"int32": 42,
"int64": 12345678910,
Expand Down Expand Up @@ -203,6 +205,7 @@
"array": {
"string": ["string", "\n"],
"boolean": [true, false],
"float": [0.1875, -0.75],
"double": [0.375, -1.5],
"int32": [42, 24],
"int64": [12345678910, -987654321],
Expand All @@ -226,6 +229,7 @@
"array": {
"string": ["string", "\n"],
"boolean": [true, false],
"float": [0.1875, -0.75],
"double": [0.375, -1.5],
"int32": [42, 24],
"int64": [12345678910, -987654321],
Expand All @@ -252,6 +256,7 @@
"field": {
"string": "string",
"boolean": true,
"float": 0.1875,
"double": 0.375,
"int32": 42,
"int64": 12345678910,
Expand All @@ -268,6 +273,7 @@
"field": {
"string": "string",
"boolean": true,
"float": 0.1875,
"double": 0.375,
"int32": 42,
"int64": 12345678910,
Expand All @@ -287,6 +293,7 @@
"request": {
"string": "string",
"boolean": true,
"float": 0.1875,
"double": 0.375,
"int32": 42,
"int64": 12345678910,
Expand All @@ -297,6 +304,7 @@
"response": {
"string": "string",
"boolean": true,
"float": 0.1875,
"double": 0.375,
"int32": 42,
"int64": 12345678910,
Expand All @@ -319,6 +327,7 @@
"map": {
"string": { "": "string", " ": "\n" },
"boolean": { "": true, " ": false },
"float": { "": 0.1875, " ": -0.75 },
"double": { "": 0.375, " ": -1.5 },
"int32": { "": 42, " ": 24 },
"int64": { "": 12345678910, " ": -987654321 },
Expand All @@ -341,6 +350,7 @@
"map": {
"string": { "": "string", " ": "\n" },
"boolean": { "": true, " ": false },
"float": { "": 0.1875, " ": -0.75 },
"double": { "": 0.375, " ": -1.5 },
"int32": { "": 42, " ": 24 },
"int64": { "": 12345678910, " ": -987654321 },
Expand All @@ -367,6 +377,7 @@
"nullable": {
"string": "string",
"boolean": true,
"float": 0.1875,
"double": 0.375,
"int32": 42,
"int64": 12345678910,
Expand All @@ -388,6 +399,7 @@
"nullable": {
"string": "string",
"boolean": true,
"float": 0.1875,
"double": 0.375,
"int32": 42,
"int64": 12345678910,
Expand Down Expand Up @@ -429,6 +441,7 @@
"nullable": {
"string": null,
"boolean": null,
"float": null,
"double": null,
"int32": null,
"int64": null,
Expand All @@ -450,6 +463,7 @@
"nullable": {
"string": null,
"boolean": null,
"float": null,
"double": null,
"int32": null,
"int64": null,
Expand All @@ -475,6 +489,7 @@
"result": {
"string": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
"boolean": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
"float": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
"double": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
"int32": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
"int64": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
Expand All @@ -496,6 +511,7 @@
"result": {
"string": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
"boolean": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
"float": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
"double": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
"int32": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
"int64": { "error": { "code": "code", "message": "message", "innerError": { "code": "code" }, "details": { "": null, " ": [null] } } },
Expand All @@ -521,6 +537,7 @@
"result": {
"string": { "value": "string" },
"boolean": { "value": true },
"float": { "value": 0.1875 },
"double": { "value": 0.375 },
"int32": { "value": 42 },
"int64": { "value": 12345678910 },
Expand All @@ -543,6 +560,7 @@
"result": {
"string": { "value": "string" },
"boolean": { "value": true },
"float": { "value": 0.1875 },
"double": { "value": 0.375 },
"int32": { "value": 42 },
"int64": { "value": 12345678910 },
Expand Down Expand Up @@ -785,11 +803,12 @@
"method": "checkPath",
"httpRequest": {
"method": "GET",
"path": "/CHECKPATH/pathCase/true/1.5/3/4/0.625/yes/2001-02-03T04:05:06Z"
"path": "/CHECKPATH/pathCase/true/0.75/1.5/3/4/0.625/yes/2001-02-03T04:05:06Z"
},
"request": {
"string": "pathCase",
"boolean": true,
"float": 0.75,
"double": 1.5,
"int32": 3,
"int64": 4,
Expand All @@ -804,11 +823,12 @@
"method": "checkPath",
"httpRequest": {
"method": "GET",
"path": "/checkPath/booleanCase/TRUE/1.5/3/4/0.625/yes/2001-02-03T04:05:06Z"
"path": "/checkPath/booleanCase/TRUE/0.75/1.5/3/4/0.625/yes/2001-02-03T04:05:06Z"
},
"request": {
"string": "booleanCase",
"boolean": true,
"float": 0.75,
"double": 1.5,
"int32": 3,
"int64": 4,
Expand All @@ -823,11 +843,12 @@
"method": "checkQuery",
"httpRequest": {
"method": "GET",
"path": "/CHECKQUERY?string=pathCase&boolean=true&double=1.5&int32=3&int64=4&decimal=0.625&enum=yes&datetime=2001-02-03T04:05:06Z"
"path": "/CHECKQUERY?string=pathCase&boolean=true&float=0.75&double=1.5&int32=3&int64=4&decimal=0.625&enum=yes&datetime=2001-02-03T04:05:06Z"
},
"request": {
"string": "pathCase",
"boolean": true,
"float": 0.75,
"double": 1.5,
"int32": 3,
"int64": 4,
Expand All @@ -842,11 +863,12 @@
"method": "checkQuery",
"httpRequest": {
"method": "GET",
"path": "/checkQuery?STRING=queryCase&boolean=true&double=1.5&int32=3&int64=4&decimal=0.625&enum=yes&datetime=2001-02-03T04:05:06Z"
"path": "/checkQuery?STRING=queryCase&boolean=true&float=0.75&double=1.5&int32=3&int64=4&decimal=0.625&enum=yes&datetime=2001-02-03T04:05:06Z"
},
"request": {
"string": "queryCase",
"boolean": true,
"float": 0.75,
"double": 1.5,
"int32": 3,
"int64": 4,
Expand Down
14 changes: 13 additions & 1 deletion 14 conformance/src/conformanceApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ class ConformanceApiHttpClient implements IConformanceApi {
const query: string[] = [];
request.string == null || query.push('string=' + encodeURIComponent(request.string));
request.boolean == null || query.push('boolean=' + request.boolean.toString());
request.float == null || query.push('float=' + encodeURIComponent(request.float.toString()));
request.double == null || query.push('double=' + encodeURIComponent(request.double.toString()));
request.int32 == null || query.push('int32=' + request.int32.toString());
request.int64 == null || query.push('int64=' + request.int64.toString());
Expand Down Expand Up @@ -289,6 +290,10 @@ class ConformanceApiHttpClient implements IConformanceApi {
if (!uriPartBoolean) {
return Promise.resolve(createRequiredRequestFieldError('boolean'));
}
const uriPartFloat = request.float != null && encodeURIComponent(request.float.toString());
if (!uriPartFloat) {
return Promise.resolve(createRequiredRequestFieldError('float'));
}
const uriPartDouble = request.double != null && encodeURIComponent(request.double.toString());
if (!uriPartDouble) {
return Promise.resolve(createRequiredRequestFieldError('double'));
Expand All @@ -313,7 +318,7 @@ class ConformanceApiHttpClient implements IConformanceApi {
if (!uriPartDatetime) {
return Promise.resolve(createRequiredRequestFieldError('datetime'));
}
const uri = `checkPath/${uriPartString}/${uriPartBoolean}/${uriPartDouble}/${uriPartInt32}/${uriPartInt64}/${uriPartDecimal}/${uriPartEnum}/${uriPartDatetime}`;
const uri = `checkPath/${uriPartString}/${uriPartBoolean}/${uriPartFloat}/${uriPartDouble}/${uriPartInt32}/${uriPartInt64}/${uriPartDecimal}/${uriPartEnum}/${uriPartDatetime}`;
const fetchRequest: IFetchRequest = {
method: 'GET',
};
Expand Down Expand Up @@ -343,6 +348,9 @@ class ConformanceApiHttpClient implements IConformanceApi {
if (request.boolean != null) {
fetchRequest.headers!['boolean'] = request.boolean.toString();
}
if (request.float != null) {
fetchRequest.headers!['float'] = request.float.toString();
}
if (request.double != null) {
fetchRequest.headers!['double'] = request.double.toString();
}
Expand Down Expand Up @@ -380,6 +388,10 @@ class ConformanceApiHttpClient implements IConformanceApi {
if (headerValue != null) {
value.boolean = parseBoolean(headerValue);
}
headerValue = result.response.headers.get('float');
if (headerValue != null) {
value.float = parseFloat(headerValue);
}
headerValue = result.response.headers.get('double');
if (headerValue != null) {
value.double = parseFloat(headerValue);
Expand Down
Loading
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.