Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/62 adding schema generator code #5

Merged
merged 4 commits into from
Aug 23, 2023
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Contract } from "src/types";
import { Contract } from "../../types";
export interface PersonRegisteredContract extends Contract {
"detail-type": "PersonRegisteredContract";
detail: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Contract } from "src/types";
import { Contract } from "../../types";
export interface PersonRegisteredContract extends Contract {
"detail-type": "PersonRegisteredContract";
detail: {
Expand Down
9 changes: 9 additions & 0 deletions example-architecture/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export interface Contract {
readonly "detail-type": string;
readonly detail: Detail;
}

export interface Detail {
readonly "detail-version": number;
readonly data: Record<string, unknown>;
}
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"repository": "https://github.com/aleios-cloud/eventbridge-toolbox.git",
"scripts": {
"clean": "rimraf dist",
"test": "vitest run",
"lint-fix": "eslint . --ext=js,ts --fix",
"lint-test": "eslint . --ext=js,ts",
"build": "pnpm clean && tsc && cp src/doc-template.md dist/doc-template.md"
"build": "pnpm clean && tsc",
"generate-example-docs": "ts-node --esm src/script.ts example-architecture/events/contracts event-catalog/events"
},
"files": [
"dist"
Expand Down Expand Up @@ -38,6 +40,7 @@
"ts-json-schema-generator": "^1.2.0",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.6"
"typescript": "^5.1.6",
"vitest": "^0.34.1"
}
}
}
Loading