config.json

Path: .api-craft/config.json

The project root. Its presence is what makes a directory an API Craft project; the CLI and app discover the project by walking up from the working directory until they find it.

Example

{
  "version": 1,
  "name": "Petstore Project",
  "apisDir": "apis"
}

Fields

FieldTypeRequiredDescription
versionnumberyesFile format version. Currently 1.
namestringyesHuman-readable project name.
apisDirstringyesDirectory holding the APIs, relative to the project root. Defaults to apis.
pluginsstringnonpm package names of plugins to load.
privatebooleannoWhen set at init, the project is marked private and the APIs directory is gitignored.
Coming soonPlugins

The plugins array is part of the format, but the plugin system isn't built yet; see Plugins. Listing a package has no effect today.