Skip to content

Commit

Permalink
Fix pattern fields from schema that Ajv considers invalid regexes
Browse files Browse the repository at this point in the history
This is a temporary fix to get things rendering, until we can upstream a
fix to dandi-schema.
  • Loading branch information
mvandenburgh committed Feb 23, 2025
1 parent deee718 commit d57d9fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/src/stores/dandiset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export const useDandisetStore = defineStore('dandiset', {

const schema = await RefParser.dereference(res.data);

// TODO: Fix this upstream in the schema
schema['properties']['identifier']['pattern'] = '^DANDI:\\d{6}$'
schema['$defs']['Project']['properties']['wasAssociatedWith']['items']['oneOf'][2]['properties']['identifier']['pattern'] = '^RRID:.*'

this.schema = schema;
},
async fetchOwners(identifier: string) {
Expand Down

0 comments on commit d57d9fb

Please sign in to comment.