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:
dsc-resource
(reference documentation) - Represents a DSC Resource as returned from thedsc resource list
command.resource-manifest
(reference documentation) - Validates a command-based DSC Resource's manifest. If the manifest is invalid, DSC raises an error.get-result
(reference documentation) - Represents the output from thedsc resource get
command.set-result
(reference documentation) - Represents the output from thedsc resource set
command.test-result
(reference documentation) - Represents the output from thedsc resource test
command.configuration
(reference documentation) - Validates a DSC Configuration document. If the document is invalid, DSC raises an error.configuration-get-result
(reference documentation) - Represents the output from thedsc config get
command.configuration-set-result
(reference documentation) - Represents the output from thedsc config set
command.configuration-test-result
(reference documentation) - Represents the output from thedsc config test
command.
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for