yamlscript icon indicating copy to clipboard operation
yamlscript copied to clipboard

Schema support

Open ingydotnet opened this issue 1 year ago • 1 comments

By default, YS only supports the tags provided by the YAML 1.2 JSON Schema which include: !!map, !!seq, !!str, !!bool, !!int, !!float.

Any other tag will error because it is not known by the schema and thus not able to load.

Tags are seldomly used in YAML, but some projects like Amazon CloudFormation make good use of them.

We need to provide a way for a YS program to declare its schema.

Two ideas that come to mind are:

A YS starting tag extension:

!yamlscript/v0?schema=CloudFormation

Or a namespace declaration addition:

ns foo:
  schema: aws-cloudformation/schema-v1.2.3

There are obviously details to work out about how/where one hosts a custom schema.

ingydotnet avatar Dec 27 '23 17:12 ingydotnet

Check this solution: https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning

colltoaction avatar Feb 29 '24 16:02 colltoaction