Skip to content

Commit

Permalink
Merge pull request #107 from Vidushi-GitHub/numberToString
Browse files Browse the repository at this point in the history
reference as string instead of number
  • Loading branch information
dakota002 authored Sep 22, 2023
2 parents 170d6bf + 3e1e56c commit 8f68586
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gcn/notices/core/FollowUp.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
"reference": {
"type": "object",
"additionalProperties": { "type": "number" },
"description": "Reference as distributed by the notices or circulars or ATel, ex. gcn.notices.Fermi.gbm.alert: 4642"
"additionalProperties": { "type": ["number", "string"] },
"description": "Reference as distributed by the notices or circulars or ATel, ex. gcn circulars: 12345, gcn.notices.LVK.alert: SYYMMDDak-2-preliminary. "
}
}
}
6 changes: 5 additions & 1 deletion validate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import addFormats from 'ajv-formats'
import meta from 'ajv/dist/refs/json-schema-2020-12/index.js'
import { glob as baseGlob } from 'glob'

const ajv = new Ajv({ validateSchema: true, verbose: true })
const ajv = new Ajv({
validateSchema: true,
verbose: true,
allowUnionTypes: true,
})
addFormats(ajv)
ajv.addMetaSchema(meta)

Expand Down

0 comments on commit 8f68586

Please sign in to comment.