How the YAML files look
Getting started 4 · 3:08
An integration's folder has several YAML files, from Camel's route file to Weik.io's deployment documents, and each has its own shape. The video goes through keys, indentation, lists and comments, and weikio validate finds a misspelled field before anything reaches the hub.
What it covers
- The folder of files that
weikio init hellowrites - Keys, indentation and list dashes in the route file
hello.camel.yaml - Comments in
integration.yamlthat show the fields it may declare - How Camel's route file, the flat
integration.yamland Weik.io's documents differ apiVersion,kind,metadataandspecin a deployment document- A misspelled field caught by
weikio validate, with its file and line
Commands in this video
Terminal
$ weikio init hello
$ weikio validate -f ./hello
$ weikio validate -f .Transcript
- 0:01This video reads the YAML files in an integration's folder.
- 0:05Files are text you can read and keep in Git.
- 0:09Your working folder is empty.
- 0:11The Weik.io CLI is signed in with its context.
- 0:14The context line runs to the hub.
- 0:21The command weikio init hello writes a folder of files.
- 0:25The answer lists the three files it wrote.
- 0:28The next line names the project and the environment from the context.
- 0:36The panel shows hello.camel.yaml, where id and hello are one key and its value.
- 0:43A key holds more keys indented under it. Indentation is the structure.
- 0:49A dash starts each item of a list, here the two steps of the route.
- 0:57The panel shows integration.yaml with its name line.
- 1:01A hash starts a comment, a line the tools do not read.
- 1:05Each comment shows a field the file may declare.
- 1:11The third file is not YAML.
- 1:13One line holds a key, an equals sign and a value.
- 1:21The route file is Camel's own YAML. The platform runs it as Camel does.
- 1:27integration.yaml is optional, and it is the flat form.
- 1:31A document describes one thing the hub store keeps.
- 1:34Document files can hold several documents.
- 1:39application.properties is none of these three shapes.
- 1:47Deployment documents start with apiVersion, kind, metadata and spec.
- 1:53The kind reads deployment, in lower case.
- 1:57metadata names the integration, spec gives the version.
- 2:04The panel shows three lines of integration.yaml.
- 2:08An edit uncommented the version field on line 3 and misspelled its name.
- 2:13The command weikio validate checks the folder hello.
- 2:18The finding names the file, the line and the field.
- 2:21The check reads each file before anything reaches the hub store.
- 2:27Correct the field name to version, and the panel shows the fixed file.
- 2:32The same command now checks the whole working folder.
- 2:35The answer counts one document and one integration and finds nothing to fix.
- 2:40A checked outline stands around both folder boxes.
- 2:47The route file is Camel's own YAML.
- 2:50integration.yaml is optional, in the flat form.
- 2:54A document describes one thing the hub store keeps.
- 2:58The check found nothing to fix.