Compare commits
6 Commits
7259dfaa37
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ac0215247 | |||
| 07f224ff18 | |||
| 91e9432a07 | |||
| 50e2907f47 | |||
| e3bab25418 | |||
| 6298763f2f |
@@ -59,9 +59,29 @@ jobs:
|
|||||||
}' >> index.ts
|
}' >> index.ts
|
||||||
|
|
||||||
VERSION="${{ steps.get_version.outputs.VERSION }}"
|
VERSION="${{ steps.get_version.outputs.VERSION }}"
|
||||||
|
REPO_URL="${{ github.server_url }}/${{ github.repository }}.git"
|
||||||
jq --arg ver "$VERSION" \
|
jq --arg ver "$VERSION" \
|
||||||
--arg name "@owlboard/api-schema-types" \
|
--arg name "@owlboard/api-schema-types" \
|
||||||
'.name = $name | .version = $ver | .type = "module" | .main = "./dist/index.js" | .types = "./dist/index.d.ts"' \
|
--arg repo "$REPO_URL" \
|
||||||
|
'.name = $name |
|
||||||
|
.description = "TypeScript type definitions for OwlBoard API schemas" |
|
||||||
|
.author = "Frederick Boniface" |
|
||||||
|
.version = $ver |
|
||||||
|
.type = "module" |
|
||||||
|
.main = "./dist/index.js" |
|
||||||
|
.license = "MIT" |
|
||||||
|
.repository = { "type": "git", "url": $repo } |
|
||||||
|
.files = ["dist"] |
|
||||||
|
.sideEffects = false |
|
||||||
|
.dependencies = {} |
|
||||||
|
.devDependencies = {} |
|
||||||
|
.exports = {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.js"
|
||||||
|
}
|
||||||
|
} |
|
||||||
|
.types = "./dist/index.d.ts"' \
|
||||||
package.json > package.json.new && mv package.json.new package.json
|
package.json > package.json.new && mv package.json.new package.json
|
||||||
|
|
||||||
# Compile
|
# Compile
|
||||||
@@ -74,7 +94,7 @@ jobs:
|
|||||||
- name: Publish Go
|
- name: Publish Go
|
||||||
run: |
|
run: |
|
||||||
VERSION="v${{ steps.get_version.outputs.VERSION }}"
|
VERSION="v${{ steps.get_version.outputs.VERSION }}"
|
||||||
MOD_NAME="git.fjla.uk/owlboard/api-schema-types"
|
MOD_NAME="git.fjla.uk/owlboard/api-schema-types/v3"
|
||||||
ZIP_ROOT="/tmp/go_upload"
|
ZIP_ROOT="/tmp/go_upload"
|
||||||
FULL_PATH="$ZIP_ROOT/$MOD_NAME@$VERSION"
|
FULL_PATH="$ZIP_ROOT/$MOD_NAME@$VERSION"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"$id": "https://schema.owlboard.info/api/api-envelope.schema.json",
|
"$id": "https://schema.owlboard.info/api/api-envelope.schema.json",
|
||||||
"$schema": "https://json-schema.org/draft-07/schema#",
|
"$schema": "https://json-schema.org/draft-07/schema#",
|
||||||
"title": "ApiEnvelope",
|
"title": "Envelope",
|
||||||
|
"description": "OwlBoard API Envelope",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"t": {
|
"t": {
|
||||||
@@ -10,11 +11,7 @@
|
|||||||
"description": "Unix timestamp showing when the data was generated, or the time the error was encountered"
|
"description": "Unix timestamp showing when the data was generated, or the time the error was encountered"
|
||||||
},
|
},
|
||||||
"d": {
|
"d": {
|
||||||
"description": "Payload data. Type depends on request endpoint",
|
"description": "Payload data. Type depends on request endpoint"
|
||||||
"anyOf": [
|
|
||||||
{"type": "object"},
|
|
||||||
{"type": "array"}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"e": {
|
"e": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
"$id": "https://schema.owlboard.info/api/pis-object.schema.json",
|
"$id": "https://schema.owlboard.info/api/pis-object.schema.json",
|
||||||
"$schema": "https://json-schema.org/draft-07/schema#",
|
"$schema": "https://json-schema.org/draft-07/schema#",
|
||||||
"title": "PisObjects",
|
"title": "PisObjects",
|
||||||
|
"description": "PIS API Resonse, contains the code and optionally, TOC and/or a list of CRS, TIPLOC",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"code": {
|
"code": {
|
||||||
@@ -34,6 +35,20 @@
|
|||||||
"pattern": "^[a-zA-Z0-9]+$"
|
"pattern": "^[a-zA-Z0-9]+$"
|
||||||
},
|
},
|
||||||
"description": "List of TIPLOC Codes"
|
"description": "List of TIPLOC Codes"
|
||||||
|
},
|
||||||
|
"skip": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"skip": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Number of stops to skip"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["head", "tail"],
|
||||||
|
"description": "Position of stops to be skipped, either 'head' or 'tail'"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["code"],
|
"required": ["code"],
|
||||||
Reference in New Issue
Block a user