Skip to content

Commit

Permalink
MMT-3903: Update MMT to the new UMM-C schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mandyparson committed Nov 14, 2024
1 parent 9316f6f commit 0286cea
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sharedUtils/__tests__/getConfig.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('getConfig', () => {
describe('when ummVersionConfig is called', () => {
test('returns a valid json object for ummVersionConfig', () => {
const expectedUmmVersionConfig = {
ummC: '1.18.1',
ummC: '1.18.2',
ummS: '1.5.3',
ummT: '1.2.0',
ummV: '1.9.0'
Expand Down
2 changes: 1 addition & 1 deletion static.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
},
"ummVersions": {
"ummC": "1.18.1",
"ummC": "1.18.2",
"ummS": "1.5.3",
"ummT": "1.2.0",
"ummV": "1.9.0"
Expand Down
18 changes: 14 additions & 4 deletions static/src/js/schemas/umm/ummCSchema.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import staticConfig from '../../../../../static.config.json'

const getConfig = () => staticConfig

const ummCVersion = getConfig().ummVersions.ummC

const ummCSchema = {
$schema: 'http://json-schema.org/draft-07/schema#',
title: 'UMM-C',
Expand Down Expand Up @@ -3227,8 +3233,10 @@ const ummCSchema = {
'PLANNED',
'COMPLETE',
'DEPRECATED',
'NOT APPLICABLE',
'NOT PROVIDED'
'INREVIEW',
'NOT PROVIDED',
'PREPRINT',
'SUPERSEDED'
]
},
LocationKeywordType: {
Expand Down Expand Up @@ -3688,6 +3696,8 @@ const ummCSchema = {
'Child Dataset',
'Collaborative/Other Agency',
'Field Campaign',
'IsPreviousVersionOf',
'IsNewVersionOf',
'Parent Dataset',
'Related Dataset'
]
Expand Down Expand Up @@ -3809,7 +3819,7 @@ const ummCSchema = {
description: 'This element represents the URL where the schema lives. The schema can be downloaded.',
type: 'string',
enum: [
'https://cdn.earthdata.nasa.gov/umm/collection/v1.18.1'
`https://cdn.earthdata.nasa.gov/umm/collection/v${ummCVersion}`
]
},
Name: {
Expand All @@ -3823,7 +3833,7 @@ const ummCSchema = {
description: 'This element represents the version of the schema.',
type: 'string',
enum: [
'1.18.1'
`${ummCVersion}`
]
}
},
Expand Down

0 comments on commit 0286cea

Please sign in to comment.