Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d96d6f5
generate error sets (#57)
heymb Sep 18, 2023
80e741f
Publish 2.9.0.
Sep 18, 2023
04b7493
Make failed expectations more clear in conformanceApiTests.ts.
mitchknife Dec 15, 2023
b6f838e
Clean up conformance test runner.
mitchknife Dec 15, 2023
c11db89
Add simple working fastify app for conformance tests.
mitchknife Dec 15, 2023
b4f1516
Add "hand rolled" ConformanceApi plugin.
mitchknife Dec 15, 2023
724ddca
Generate fastify plugin shell.
mitchknife Dec 15, 2023
ae6f3b9
Fill out codegen for fastify plugin.
mitchknife Dec 16, 2023
0901688
Generate separate copy of types for fastify plugin.
mitchknife Dec 16, 2023
862cc03
Consolidate duplicate code into local functions.
mitchknife Dec 16, 2023
9175554
Delete handRolledPlugin.ts
mitchknife Dec 16, 2023
a7a77ef
Clean up plain js support.
mitchknife Dec 16, 2023
dd18f5a
Restructure conformance folder structure.
mitchknife Dec 17, 2023
6470f1d
Only generate fastify plugin when option is supplied.
mitchknife Dec 17, 2023
da68074
Validate ConformanceTests.json before running tests.
mitchknife Dec 18, 2023
26b39c1
Support raw http requests in conformance tests.
mitchknife Dec 18, 2023
c576130
Support case insensitive querystring keys in fastify plugin.
mitchknife Dec 18, 2023
d7bfd59
Enable case insensitve routing for fastify conformance servers.
mitchknife Dec 18, 2023
6102789
Add service error handling support to fastify plugin.
mitchknife Dec 18, 2023
c625c24
Add clarifying doc comments.
mitchknife Dec 18, 2023
0c72936
Run conformance js and ts fastify plugins together.
mitchknife Dec 19, 2023
d17ad41
Merge pull request #59 from mitchknife/fastify
mitchknife Dec 29, 2023
35be5b5
Add JsonSchema support to fastify plugin.
mitchknife Dec 30, 2023
a00bbc0
Switch on `ServiceTypeKind`
mitchknife Jan 1, 2024
51f5c1f
Assume non-null value from `GetFieldType`.
mitchknife Jan 1, 2024
580c68b
Don't use interpolated strings to prevent analysis warning.
mitchknife Jan 1, 2024
fff1953
Merge pull request #60 from mitchknife/fastify-json-schema
mitchknife Jan 2, 2024
e36eb2d
Miscellaneous updates.
ejball Jan 20, 2024
035032d
Miscellaneous updates.
ejball Mar 22, 2024
699dfaf
Don't align raw literal string content.
ejball Mar 23, 2024
ba84bb9
Allow explicit docs publish.
ejball Mar 23, 2024
f590b40
Update dependencies.
ejball Mar 23, 2024
a82d484
Fix docs publish.
ejball Mar 26, 2024
e781147
Update dependency.
ejball May 15, 2024
4a90067
Install .NET 6.0 and 8.0 SDKs.
ejball May 17, 2024
761d526
Merge template/faithlife-build.
ejball May 17, 2024
de9699f
Add file name suffix option (#61)
victorbush May 17, 2024
adefd41
Publish 2.10.0 (#62)
victorbush May 20, 2024
2b22cfa
Documentation updated.
FacilityApiBot May 20, 2024
e1a282a
Fix types file references when using file-name-suffix option . (#63)
victorbush May 21, 2024
6a63fb0
Publish 2.10.1. (#64)
victorbush May 21, 2024
4928a03
Enable use of external enums as URI and header params. (#65)
victorbush Jun 26, 2024
9a0260e
Publish 2.11.0. (#66)
victorbush Jun 26, 2024
0df8f2e
Ignore events for now.
ejball Jul 4, 2024
86206e7
Publish 2.11.1.
ejball Jul 4, 2024
6365737
Merge pull request #67 from ejball/events
ejball Jul 4, 2024
1824ab0
Documentation updated.
FacilityApiBot Jul 4, 2024
6cf4974
Add tests for current TS output of DTOs with "optional" and required …
heymb Aug 5, 2024
a085f10
Support generating required fields as not optional in TS
Aug 2, 2024
ff4f6ea
Run codegen since required now is not optional
Aug 2, 2024
499aa47
Update version number and release notes per contributing docs since g…
Aug 5, 2024
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
Prev Previous commit
Next Next commit
Restructure conformance folder structure.
  • Loading branch information
mitchknife committed Dec 17, 2023
commit dd18f5a8635b8a3713c4f569944dcaab7b095ae1
6 changes: 3 additions & 3 deletions conformance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "Tests the ConformanceApi client.",
"scripts": {
"build": "tsc",
"test": "npm run --silent build && mocha dist/ts/test/conformanceApiTests.js",
"fastify:ts": "npm run --silent build && fastify start -p 4117 -w -l info -P dist/ts/src/fastify/app.js",
"fastify:js": "npm run --silent build && fastify start -p 4117 -w -l info -P dist/js/src/fastify/app.js"
"test": "npm run --silent build && mocha dist/test/conformanceApiTests.js",
"fastify:ts": "npm run --silent build && fastify start -p 4117 -w -l info -P dist/src/ts/fastify/app.js",
"fastify:js": "npm run --silent build && fastify start -p 4117 -w -l info -P dist/src/js/fastify/app.js"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConformanceApiService } from "../../../ts/src/conformanceApiService.js";
import { ConformanceApiService } from "../../ts/conformanceApiService.js";
import conformanceTestsJson from "../../../ConformanceTests.json";
import { conformanceApiPlugin } from "./conformanceApiPlugin.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { FastifyPluginAsync } from "fastify";
import { ConformanceApiService } from "../conformanceApiService.js";
import conformanceTestsJson from '../../../ConformanceTests.json';
import conformanceTestsJson from "../../../ConformanceTests.json";
import { conformanceApiPlugin } from "./conformanceApiPlugin.js";

export type AppOptions = {};
const options: AppOptions = {};

const app: FastifyPluginAsync<AppOptions> = async (fastify, opts): Promise<void> => {
fastify.register(conformanceApiPlugin, { api: new ConformanceApiService(conformanceTestsJson.tests) });
const app: FastifyPluginAsync<AppOptions> = async (
fastify,
opts
): Promise<void> => {
fastify.register(conformanceApiPlugin, {
api: new ConformanceApiService(conformanceTestsJson.tests),
});
};

export default app;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { createHttpClient } from '../src/conformanceApi';
import { expect, should } from 'chai';
import fetch from 'node-fetch';
import conformanceTestsJson from '../../ConformanceTests.json';
import { createHttpClient } from "../src/ts/conformanceApi";
import { expect, should } from "chai";
import fetch from "node-fetch";
import conformanceTestsJson from "../ConformanceTests.json";

should();

const httpClient = createHttpClient({
fetch: (uri, request) => {
return fetch('http://localhost:4117/' + uri, request);
}
return fetch("http://localhost:4117/" + uri, request);
},
});

describe('tests', () => {

describe("tests", () => {
conformanceTestsJson.tests.forEach((data: any) => {
it(data.test, async () => {
return ((httpClient as any)[data.method](data.request))
return (httpClient as any)
[data.method](data.request)
.then((result: any) => {
expect({
error: result.error ?? undefined,
Expand All @@ -27,5 +27,4 @@ describe('tests', () => {
});
});
});

});
7 changes: 4 additions & 3 deletions conformance/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"allowJs": true
},
"include": [
"ts/**/*.ts",
"js/**/*.js"
]
"src/**/*.ts",
"src/**/*.js",
"test/**/*.ts"
],
}
4 changes: 2 additions & 2 deletions tools/Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ void CodeGen(bool verify)

RunDotNet("FacilityConformance", "fsd", "--output", "conformance/ConformanceApi.fsd", verifyOption);
RunDotNet("FacilityConformance", "json", "--output", "conformance/ConformanceTests.json", verifyOption);
RunCodeGen("conformance/ConformanceApi.fsd", "conformance/js/src/", "--fastify", "--indent", "2", "--disable-eslint");
RunCodeGen("conformance/ConformanceApi.fsd", "conformance/ts/src/", "--typescript", "--fastify", "--indent", "2", "--disable-eslint");
RunCodeGen("conformance/ConformanceApi.fsd", "conformance/src/js/", "--fastify", "--indent", "2", "--disable-eslint");
RunCodeGen("conformance/ConformanceApi.fsd", "conformance/src/ts/", "--typescript", "--fastify", "--indent", "2", "--disable-eslint");

void RunCodeGen(params string?[] args) =>
RunDotNet(new[] { "run", "--no-build", "--project", $"src/{codegen}", "-f", "net6.0", "-c", configuration, "--", "--newline", "lf", verifyOption }.Concat(args));
Expand Down