Skip to content

Latest commit

History

History
106 lines (72 loc) · 4.4 KB

File metadata and controls

106 lines (72 loc) · 4.4 KB
external help fileschema-help.xml
Module Nameschema
online versionhttps://github.com/SchemaModule/PowerShell/blob/master/docs/Get-SchemaDefinition.md#get-schemadefinition
schema2.0.0

Get-SchemaDefinition

SYNOPSIS

A function to follow the Definition keyword and return the referenced schema

SYNTAX

Get-SchemaDefinition [[-Reference] <String>] [<CommonParameters>]

DESCRIPTION

A function to follow the Definition keyword and return the referenced schema. This function is mostly used in conjunction with Get-SchemaReference when processing a larger schema that has been broken into multiple files.

EXAMPLES

Example 1

Get-SchemaDefinition-Reference "https://example.com/schemas/objects.json#/definitions/Name"|fl *
type : string
id : #/definitions/Name
ref :
minLength : 0
maxLength : 0
pattern : ^(.*)$
enum :
title : The Name Schema
description :
default :
examples : {}

This example shows how this might be used to get the definition that is defined

PARAMETERS

-Reference

A URL to where this reference is found.

Type: System.StringParameter Sets: (All)Aliases:
Required: FalsePosition: 0Default value: NoneAccept pipeline input: True (ByValue)Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.Uri

OUTPUTS

schemaDocument

This class is really modified object that contains the $schema attribute as well as validation on what values can be present for that attribute. Schema Object (https://json-schema.org/understanding-json-schema/reference/object.html) Schema Keyword (https://json-schema.org/understanding-json-schema/reference/schema.html) Schema Types (https://json-schema.org/understanding-json-schema/reference/type.html)

schemaString

The string type is used for strings of text. It may contain Unicode characters. Schema String (https://json-schema.org/understanding-json-schema/reference/string.html) Schema Types (https://json-schema.org/understanding-json-schema/reference/type.html)

schemaInteger

The integer type is used for integral numbers. In PowerShell this is an int32 Schema Integer (http://json-schema.org/understanding-json-schema/reference/numeric.html#integer) Schema Types (https://json-schema.org/understanding-json-schema/reference/type.html)

schemaNumber

The number type is used for any numeric type, either integers or floating point numbers. In PowerShell this is a double. Schema Number (http://json-schema.org/understanding-json-schema/reference/numeric.html#number) Schema Types (https://json-schema.org/understanding-json-schema/reference/type.html)

schemaBoolean

The boolean type matches only two special values: true and false. Note that values that evaluate to true or false, such as 1 and 0, are not accepted by the schema. Schema Boolean (http://json-schema.org/understanding-json-schema/reference/boolean.html) Schema Types (https://json-schema.org/understanding-json-schema/reference/type.html)

schemaObject

Objects are the mapping type in JSON. They map "keys" to "values". In JSON, the "keys" must always be strings. Each of these pairs is conventionally referred to as a "property". Schema Object (https://json-schema.org/understanding-json-schema/reference/object.html) Schema Types (https://json-schema.org/understanding-json-schema/reference/type.html)

schemaArray

Arrays are used for ordered elements. In JSON, each element in an array may be of a different type. Schema Array (https://json-schema.org/understanding-json-schema/reference/array.html) Schema Types (https://json-schema.org/understanding-json-schema/reference/type.html)

NOTES

RELATED LINKS

Get-SchemaDocument

ConvertTo-SchemaElement

About Classes

JSON Schema Reference