rad_schema-1.0.0
RAD Metaschema
Description
A metaschema that extends the ASDF metaschema to add support for Science Data Formatting and archive catalog-related properties.
Outline
Schema Definitions ¶
This node must validate against all of the following:
This type is an object with the following properties:
datamodel_name
string No length restrictionName of the datamodel described by this schema
archive_meta
string No length restrictionMetadata that aids the archive in identifying ASDF files.
sdf
object Information on this attribute’s value upon creation of Level 1 files.
This type is an object with the following properties:
special_processing
string Required No length restrictionA flag indicating whether this attribute must be present in the SDF file.
Only the following values are valid for this node:
VALUE_REQUIRED
OPTIONAL
source
object Required This type is an object with the following properties:
origin
string Required No length restrictionSource of the attribute value.
function
string No length restrictionOptional function that transforms the source value.
archive_catalog
object Information on this attribute’s data type and destination table and column in the archive catalog.
This type is an object with the following properties:
datatype
object Required Column type in the archive catalog database.
This node must validate against any of the following:
- No length restriction
string
Only the following values are valid for this node:
datetime2
float
int
nchar(1)
nvarchar(max)
bigint
smallint
tinyint
- No length restriction
string
Must match the following pattern:
^nvarchar\([0-9]+\)$
destination
array Required Table and column in the archive catalog database
Minimum length: 1
Items in the array are restricted to the following types:
No length restrictionstring
Must match the following pattern:
^[A-Za-z0-9]+\.[a-z0-9_]+$
additionalItems
object This node must validate against any of the following:
boolean
items
object This node must validate against any of the following:
additionalProperties
object This node must validate against any of the following:
boolean
definitions
object object
properties
object object
patternProperties
object object
dependencies
object object
allOf
schemaArray anyOf
schemaArray oneOf
schemaArray not
#
Internal Definitions ¶
schemaArray
array |
Minimum length: 1
Items in the array are restricted to the following types:
Original Schema ¶
%YAML 1.1
---
$schema: http://stsci.edu/schemas/yaml-schema/draft-01
id: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0
title: RAD Metaschema
description: |
A metaschema that extends the ASDF metaschema to add support for Science
Data Formatting and archive catalog-related properties.
allOf:
- $ref: http://stsci.edu/schemas/asdf/asdf-schema-1.0.0
- type: object
properties:
datamodel_name:
title: Datamodel Name
description: |-
Name of the datamodel described by this schema
type: string
archive_meta:
title: Archive Metadata
description: |-
Metadata that aids the archive in identifying ASDF files.
type: string
sdf:
title: Scientific Data Format
description: |-
Information on this attribute's value upon creation of Level 1 files.
type: object
properties:
special_processing:
title: Special Processing
description: |-
A flag indicating whether this attribute must be present in the
SDF file.
type: string
enum: [VALUE_REQUIRED, OPTIONAL]
source:
type: object
properties:
origin:
title: Origin
description: |-
Source of the attribute value.
type: string
function:
title: Function
description: |-
Optional function that transforms the source value.
type: string
required: [origin]
required: [special_processing, source]
archive_catalog:
title: Archive Catalog
description: |-
Information on this attribute's data type and destination table and
column in the archive catalog.
type: object
properties:
datatype:
title: Archive Catalog Database Column Type
description: |-
Column type in the archive catalog database.
anyOf:
- type: string
enum: [datetime2, float, int, nchar(1), nvarchar(max), bigint, smallint, tinyint]
- type: string
pattern: "^nvarchar\\([0-9]+\\)$"
destination:
title: Destination
description: |-
Table and column in the archive catalog database
type: array
items:
type: string
pattern: "^[A-Za-z0-9]+\\.[a-z0-9_]+$"
minItems: 1
uniqueItems: true
required: [datatype, destination]
# Needed to cause the validator to check sdf and archive_catalog
# in object properties.
additionalItems:
anyOf:
- type: boolean
- $ref: "#"
items:
anyOf:
- $ref: "#"
- $ref: "#/definitions/schemaArray"
additionalProperties:
anyOf:
- type: boolean
- $ref: "#"
definitions:
type: object
additionalProperties:
$ref: "#"
properties:
type: object
additionalProperties:
$ref: "#"
patternProperties:
type: object
additionalProperties:
$ref: "#"
dependencies:
type: object
additionalProperties:
anyOf:
- $ref: "#"
- $ref: "http://json-schema.org/draft-04/schema#/definitions/stringArray"
allOf:
$ref: "#/definitions/schemaArray"
anyOf:
$ref: "#/definitions/schemaArray"
oneOf:
$ref: "#/definitions/schemaArray"
not:
$ref: "#"
# Needed to cause the validator to check sdf and archive_catalog
# in object properties.
definitions:
schemaArray:
type: array
minItems: 1
items:
$ref: "#"
...