Existing Schema language analysis

We considered several existing languages for schema modeling in the context of midPrivacy based on our existing experience with using custom XSD annotations in midPoint and implementation of YANG language in OpenDaylight projects.

Topic Java (current) XSD (current) YANG SCIM JSON Schema

Syntax / Host language

Syntax which is used to write model, eg. host language for schema.

Java interfaces & beans

XML

simple C-like syntax

JSON (possibly YAML)

JSON (possibly YAML)

Standardized serialization mapping

Standardized serialization formats for modeling language

XML

XML, JSON, YAML

JSON, YAML

JSON, YAML

Verbosity

verbose

verbose

terse

terse

terse

Simple properties

Property which holds simple value

yes

yes

yes

yes

yes

Complex properties

Property which holds set of other named properties

yes

yes

yes

yes

yes

Named simple types

Does language allows for custom simple type definition? E.g. special case strings.

yes

yes

yes

no

yes

Named complex types

Does language allows for custom complex type definition? These types may have multiple named properties.

yes

yes

Partially (via grouping & maybe extension)

no

yes

Namespace support

yes

yes

yes

yes

no

Metadata support

Does language support metadata out of the box? For which concepts they support metadata? Object, Property or Value

No, needs to be explicitly modeled

No, needs to be explicitly modeled

Value level, YANG metadata extension

Object level, nested attributes needs to be modeled as complex in order to support metadata

No, needs to be explicitly modeled.

Schema language extensibility

Is language itself extensible, in order to contain additional metadata?

yes

yes using appInfo

yes, using extensions

yes, but not feasible to change the default schema

yes, using extension keywords

Identity provisioning specifics

yes

no, may be added using appInfo

no, may be added using extensions

yes, built-in basic schema

no, may be added using extension keywords

Notes

Not really a reusable "language" per se.

We are already using XSD, but we are not really happy with it.

YANG is built for a different purpose (networking) and it shows.

SCIM is specific to identity provisioning. Which may look like an advantage. But this is a major disadvantage. E.g. there is hardcoded default schema that cannot really be changed. It may be difficult to reuse for aspects that are not based on identity provisioning.

Targeted at JSON world, which is very simplistic. It may be difficult to add features that we need (e.g. versioning, namespaces).