Skip to content

Commit

Permalink
Bugfix for enum (#194)
Browse files Browse the repository at this point in the history
* Uncomment `enum` for tagged strings.

* Update changes
  • Loading branch information
WilliamJamieson authored Jan 4, 2023
1 parent 22bf9d6 commit 8a4363e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

- Add units to the schemas for science data quantities to specify allowed values. [#195]

- Fix ``enum`` bug in schemas. [#194]

0.14.0 (2022-11-04)
-------------------

Expand Down
6 changes: 4 additions & 2 deletions src/rad/resources/schemas/tagged_scalars/origin-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ $schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0
id: asdf://stsci.edu/datamodels/roman/schemas/tagged_scalars/origin-1.0.0

title: Organization responsible for creating file
# There is a bug in enum validation, currently being enforced by the converter, see issue #155 for details.
# enum: ["STSCI", "IPAC/SSC"]

type: string
enum: ["STSCI", "IPAC/SSC"]

sdf:
special_processing: VALUE_REQUIRED
source:
Expand Down
5 changes: 3 additions & 2 deletions src/rad/resources/schemas/tagged_scalars/telescope-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ $schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0
id: asdf://stsci.edu/datamodels/roman/schemas/tagged_scalars/telescope-1.0.0

title: Telescope used to acquire the data

type: string
# There is a bug in enum validation, currently being enforced by the converter, see issue #155 for details.
# enum: [ROMAN]
enum: [ROMAN]

archive_catalog:
datatype: nvarchar(5)
destination: [ScienceCommon.telescope]
Expand Down

0 comments on commit 8a4363e

Please sign in to comment.