Skip to content

Instantly share code, notes, and snippets.

@rwblair
Created April 15, 2022 18:47
Show Gist options
  • Save rwblair/77f68a2d1dec63567b5e92400fc3fd80 to your computer and use it in GitHub Desktop.
Save rwblair/77f68a2d1dec63567b5e92400fc3fd80 to your computer and use it in GitHub Desktop.
oneliner used to generate common derivatives datatypes run from inside datatypes dir.
grep -oP "^\w*:" *.yaml | sed -r 's/^(.*).yaml:(.*):/\1_\2_common:\n \$ref: schema.rules.datatypes.\1.\2\n entities:\n \$ref: schema.rules.datatypes.\1.\2.entities\n space: OPTIONAL\n desc: OPTIONAL\n/' > common_derivatives.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment