appservices schema validate
On this page
Atlas Device Sync, Atlas Edge Server, Data API, and HTTPS Endpoints are deprecated. Refer to the deprecation page for details.
Atlas Device Sync, Atlas Edge Server, Data API, HTTPS Endpoints, GraphQL, and Static Hosting are deprecated. Commands related to these features are also deprecated.
Validate a given schema against documents of a collection
Validates a collection's documents, using the deployed schema by default. If the "--use-local-app" flag is passed in, validate using the local version of the schema in the pulled app found at "data_sources/<data source name>/<database name>/<collection name>/schema.json". Different filters can be added to determine which documents should be validated.
Syntax
Command Syntax
appservices schema validate [options]
Options
Name | Type | Required | Description |
---|---|---|---|
-a, --app | string | false | Specify the name or ID of an App Service on which to validate a schema |
--project | string | false | Specify the ID of a MongoDB Atlas project |
-s, --datasource | string | false | Specify the name or ID of a datasource |
-e, --error-path | string | false | Specify the filepath for validation error details |
-d, --database | string | false | Specify the name of a database |
-c, --collection | string | false | Specify the name of a collection |
-l, --limit | int | false | Specify the maximum number of documents to return This value defaults to 500. |
--skip | int | false | Specify the numbers of documents to skip |
--filter | string | false | Specify a filter (Allowed format: '{"field": "value"}') |
--sort | string | false | Specify the sort order of the returned documents (Allowed format: '{"field": -1}') |
--local | string | false | Specify the local filepath of an app services project (Note: The local filepath must be an absolute path or the command will fail) |
--use-local-app | false | Use local version of schema | |
-h, --help | false | help for validate |
Inherited Options
Name | Type | Required | Description |
---|---|---|---|
--profile | string | false | Specify your profile (Default value: "default") [Learn more] |
--telemetry | string | false | Enable/Disable CLI usage tracking for your current profile (Default value: "on"; Allowed values: "on", "off") |
-o, --output-target | string | false | Write CLI output to the specified filepath |
-f, --output-format | string | false | Set the CLI output format (Default value: <blank>; Allowed values: <blank>, "json") |
--disable-colors | false | Disable all CLI output styling (e.g. colors, font styles, etc.) | |
-y, --yes | false | Automatically proceed through CLI commands by agreeing to any required user prompts |