Skip to main content

Repository Structure

This section describes the structure of files and placement of files in a repository.

Folder structure

A repository must have a single "Site configuration" YAML file. This file must be called raw-site.yml and must be placed at the root of the repository. Its content is documented here.

In addition, a repository can have an arbitrary number of folders and sub-folders. Each of those and can contain the following file types:

  • YAML endpoint files, with the extension .yml, which define endpoints. Their content is documented here.
  • RAW query language files, with the extension .snapi, which define the source code of the endpoint.

All other files including - e.g. documentation files such as README.md - are ignored.

The path of each YAML endpoint file will correspond to the path of the REST endpoint from where the API is deployed.

For example, given the following GitHub repository with contents:

/raw-site.yml
/folder1
/endpoint1.yml
/sub-folder
/endpoint2.yaml
/folder2
/code.snapi
/endpoint3.yml

If that repository is deployed at acme.raw-labs.com (and raw-site.yml does not define a publishUrl), then the following API endpoints will be created:

  • https://acme.raw-labs.com/folder1/endpoint1 (this corresponds to file /folder1/endpoint1.yml)
  • https://acme.raw-labs.com/folder1/sub-folder/endpoint2 (this corresponds to file /folder1/sub-folder/endpoint2.yml)
  • https://acme.raw-labs.com/folder2/endpoint3 (this corresponds to file /folder2/endpoint3.yml)