- Every key at every level is checked against the grammar of Write contracts and Schemas. A key the grammar does not know, such as
options, an uppercaseGETor a top-levelversion, is a violation. The report lists every violation in every file, and nothing is stored. - The extension must be
.yamlor.yml. The CLI refuses a file passed with anything else before contacting the broker:unsupported contract file extension: "petstore_api.txt". Inside a folder, files with any other extension are skipped. - One YAML document per file. A second document after
---is rejected withmalformed contract file: petstore_api.yaml: multiple documents are not supported. - YAML anchors and aliases are rejected with
malformed contract file: petstore_api.yaml: anchors and aliases are not supported. To reuse a shape, name it underschemasand point to it withref. - YAML comments are allowed. They are ignored when the file is parsed.
How the file is published, and what the broker answers, is in publish.