diff --git a/src/rad/resources/schemas/fps/exposure-1.0.0.yaml b/src/rad/resources/schemas/fps/exposure-1.0.0.yaml index 15c613d5..5d053277 100644 --- a/src/rad/resources/schemas/fps/exposure-1.0.0.yaml +++ b/src/rad/resources/schemas/fps/exposure-1.0.0.yaml @@ -10,7 +10,8 @@ title: | type: object properties: type: - $ref: asdf://stsci.edu/datamodels/roman/schemas/fps/exposure_type-1.0.0 + allOf: + - $ref: asdf://stsci.edu/datamodels/roman/schemas/fps/exposure_type-1.0.0 sdf: special_processing: VALUE_REQUIRED source: diff --git a/src/rad/resources/schemas/fps/guidestar-1.0.0.yaml b/src/rad/resources/schemas/fps/guidestar-1.0.0.yaml index dfcdf6de..5f145f48 100644 --- a/src/rad/resources/schemas/fps/guidestar-1.0.0.yaml +++ b/src/rad/resources/schemas/fps/guidestar-1.0.0.yaml @@ -19,7 +19,8 @@ properties: datatype: nvarchar(20) destination: [WFICommon.gw_id] gw_fgs_mode: - $ref: guidewindow_modes-1.0.0 + allOf: + - $ref: guidewindow_modes-1.0.0 sdf: special_processing: VALUE_REQUIRED source: diff --git a/src/rad/resources/schemas/fps/wfi_mode-1.0.0.yaml b/src/rad/resources/schemas/fps/wfi_mode-1.0.0.yaml index f961b756..1c28de47 100644 --- a/src/rad/resources/schemas/fps/wfi_mode-1.0.0.yaml +++ b/src/rad/resources/schemas/fps/wfi_mode-1.0.0.yaml @@ -21,10 +21,11 @@ properties: datatype: nvarchar(5) destination: [WFICommon.instrument_name] detector: + allOf: + - $ref: wfi_detector-1.0.0 title: WFI Detector description: | WFI detector used to take the data. - $ref: wfi_detector-1.0.0 sdf: special_processing: VALUE_REQUIRED source: @@ -33,10 +34,11 @@ properties: datatype: nvarchar(10) destination: [WFICommon.detector] optical_element: + allOf: + - $ref: wfi_optical_element-1.0.0 title: WFI Optical Element description: | WFI optical element used to take the data. - $ref: wfi_optical_element-1.0.0 sdf: special_processing: VALUE_REQUIRED source: diff --git a/src/rad/resources/schemas/tvac/exposure-1.0.0.yaml b/src/rad/resources/schemas/tvac/exposure-1.0.0.yaml index 42c11c44..cdc34ae5 100644 --- a/src/rad/resources/schemas/tvac/exposure-1.0.0.yaml +++ b/src/rad/resources/schemas/tvac/exposure-1.0.0.yaml @@ -10,7 +10,8 @@ title: | type: object properties: type: - $ref: asdf://stsci.edu/datamodels/roman/schemas/tvac/exposure_type-1.0.0 + allOf: + - $ref: asdf://stsci.edu/datamodels/roman/schemas/tvac/exposure_type-1.0.0 sdf: special_processing: VALUE_REQUIRED source: diff --git a/src/rad/resources/schemas/tvac/guidestar-1.0.0.yaml b/src/rad/resources/schemas/tvac/guidestar-1.0.0.yaml index 859efbd5..fa419b00 100644 --- a/src/rad/resources/schemas/tvac/guidestar-1.0.0.yaml +++ b/src/rad/resources/schemas/tvac/guidestar-1.0.0.yaml @@ -19,7 +19,8 @@ properties: datatype: nvarchar(20) destination: [WFICommon.gw_id] gw_fgs_mode: - $ref: guidewindow_modes-1.0.0 + allOf: + - $ref: guidewindow_modes-1.0.0 sdf: special_processing: VALUE_REQUIRED source: diff --git a/src/rad/resources/schemas/tvac/wfi_mode-1.0.0.yaml b/src/rad/resources/schemas/tvac/wfi_mode-1.0.0.yaml index ba975f23..80cae74a 100644 --- a/src/rad/resources/schemas/tvac/wfi_mode-1.0.0.yaml +++ b/src/rad/resources/schemas/tvac/wfi_mode-1.0.0.yaml @@ -21,10 +21,11 @@ properties: datatype: nvarchar(5) destination: [WFICommon.instrument_name] detector: + allOf: + - $ref: wfi_detector-1.0.0 title: WFI Detector description: | WFI detector used to take the data. - $ref: wfi_detector-1.0.0 sdf: special_processing: VALUE_REQUIRED source: @@ -33,10 +34,11 @@ properties: datatype: nvarchar(10) destination: [WFICommon.detector] optical_element: + allOf: + - $ref: wfi_optical_element-1.0.0 title: WFI Optical Element description: | WFI optical element used to take the data. - $ref: wfi_optical_element-1.0.0 sdf: special_processing: VALUE_REQUIRED source: diff --git a/tests/test_schemas.py b/tests/test_schemas.py index 07473bfe..b42a3306 100644 --- a/tests/test_schemas.py +++ b/tests/test_schemas.py @@ -297,16 +297,7 @@ def callback(node, nvarchars=None): asdf.treeutil.walk(schema, callback) -# don't test tvac or fps schemas as they are static -@pytest.mark.parametrize( - "uri", - [ - uri - for uri in SCHEMA_URIS - if not uri.startswith("asdf://stsci.edu/datamodels/roman/schemas/fps/") - and not uri.startswith("asdf://stsci.edu/datamodels/roman/schemas/tvac/") - ], -) +@pytest.mark.parametrize("uri", SCHEMA_URIS) def test_ref_loneliness(uri): """ An object with a $ref should contain no other items