dsc schema

Synopsis

Gets the JSON schema for a DSC type.

Syntax

dsc schema [Options] --type <TYPE>

Description

The schema command returns the JSON schema for a specific DSC type. These schemas can be used to validate the return data from the application or to generate compatible type definitions for an integrating tool.

The application uses these schemas to validate data internally when it's received or represent the output for one of the application's commands.

Examples

Example 1 - Retrieve the schema for the dsc resource get command result

dsc schema --type get-result
$schema: http://json-schema.org/draft-07/schema#
title: GetResult
type: object
required:
- actualState
properties:
  actualState:
    description: The state of the resource as it was returned by the Get method.
additionalProperties: false

Options

-t, --type

This option is mandatory for the schema command. The value for this option determines which schema the application returns:

Type:        String
Mandatory:   true
ValidValues: [
               dsc-resource,
               resource-manifest,
               get-result,
               set-result,
               test-result,
               configuration,
               configuration-get-result,
               configuration-set-result,
               configuration-test-result
             ]

-f, --format

The --format option controls the console output format for the command. If the command output is redirected or captured as a variable, the output is always JSON.

Type:         String
Mandatory:    false
DefaultValue: yaml
ValidValues:  [json, pretty-json, yaml]

-h, --help

Displays the help for the current command or subcommand. When you specify this option, the application ignores all options and arguments after this one.

Type:      Boolean
Mandatory: false