2 Commits

Author SHA1 Message Date
513196c43d Try and adjust path
Some checks failed
Generate and Release Protos / release (push) Failing after 27s
2026-05-03 00:25:17 +01:00
5d4271c193 Add PIS item to the 'TrainDetails' response
Some checks failed
Generate and Release Protos / release (push) Failing after 34s
2026-05-03 00:21:12 +01:00
2 changed files with 5 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "TrainByHeadcodeResponse",
"title": "TrainDetailsResponse",
"$defs": {
"ServiceLocation": {
"type": "object",
@@ -216,6 +216,9 @@
"items": {
"$ref": "#/$defs/ServiceLocation"
}
},
"pis": {
"$ref": "../pis-object.json"
}
}
}

View File

@@ -15,7 +15,7 @@ for file in $FILES; do
clean_name=$(echo "${file#schemas/}" | sed 's/\//_/g' | sed 's/\.json//g')
# OGenerate TS
npx --yes json-schema-to-typescript "$file" > "gen/ts/${clean_name}.ts"
npx --yes json-schema-to-typescript "$file" > "../../../gen/ts/${clean_name}.ts"
# Generate Go
go-jsonschema -p contracts "$file" > "gen/go/models/${clean_name}.go"