Skip to content

Commit

Permalink
Merge pull request #62 from sisgha/dev-gabriel
Browse files Browse the repository at this point in the history
feat(integrations/json-schema): use ts-json-schema-generator
  • Loading branch information
guesant authored May 9, 2024
2 parents eb9670e + 6fd3b7b commit 861fea9
Show file tree
Hide file tree
Showing 8 changed files with 4,594 additions and 18,227 deletions.
3 changes: 0 additions & 3 deletions .devops/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"declaration": true,
"removeComments": true,
"strictNullChecks": true,

"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
Expand Down
2 changes: 2 additions & 0 deletions integrations/dotnet/GeneratorTool/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
input.json
out.cs
5 changes: 4 additions & 1 deletion integrations/dotnet/GeneratorTool/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

build:
docker build -t "sisgea/dotnet-generator-tool" .
docker buildx build -t sisgea/dotnet-generator-tool .

sample:
SPEC_JSON_SCHEMA="./input.json" SPEC_CHARP_OUTPUT="./out.cs" dotnet run;
4 changes: 4 additions & 0 deletions integrations/dotnet/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

generate:
make -C .. -C json-schema build;
make -C GeneratorTool build;
15 changes: 15 additions & 0 deletions integrations/json-schema/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ROOT=$(shell dirname $(shell dirname $$PWD))

generate:
docker run \
--rm \
-w /spec \
-v ${ROOT}:/spec \
-u node \
-it node:lts \
npx --yes ts-json-schema-generator \
-f '/spec/core/tsconfig.build.json' \
--path '/spec/core/src/sisgea/**/*.declaration.ts' \
--functions 'hide' \
-o /spec/integrations/json-schema/v1/sisgea.schema.json \
;
Loading

0 comments on commit 861fea9

Please sign in to comment.