|
| 1 | +JSONSchema.Protocol |
| 2 | +------------------- |
| 3 | +### Synopsis |
| 4 | +json schema protocol |
| 5 | + |
| 6 | +--- |
| 7 | +### Description |
| 8 | + |
| 9 | +Converts a json schema to PowerShell. |
| 10 | + |
| 11 | +--- |
| 12 | +### Examples |
| 13 | +#### EXAMPLE 1 |
| 14 | +```PowerShell |
| 15 | +jsonschema https://aka.ms/terminal-profiles-schema#/$defs/Profile |
| 16 | +``` |
| 17 | + |
| 18 | +--- |
| 19 | +### Parameters |
| 20 | +#### **SchemaUri** |
| 21 | + |
| 22 | +The URI. |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | +> **Type**: ```[Uri]``` |
| 27 | +
|
| 28 | +> **Required**: true |
| 29 | +
|
| 30 | +> **Position**: named |
| 31 | +
|
| 32 | +> **PipelineInput**:false |
| 33 | +
|
| 34 | + |
| 35 | + |
| 36 | +--- |
| 37 | +#### **CommandAst** |
| 38 | + |
| 39 | +The Command's Abstract Syntax Tree |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +> **Type**: ```[CommandAst]``` |
| 44 | +
|
| 45 | +> **Required**: true |
| 46 | +
|
| 47 | +> **Position**: named |
| 48 | +
|
| 49 | +> **PipelineInput**:false |
| 50 | +
|
| 51 | + |
| 52 | + |
| 53 | +--- |
| 54 | +#### **ScriptBlock** |
| 55 | + |
| 56 | +> **Type**: ```[ScriptBlock]``` |
| 57 | +
|
| 58 | +> **Required**: true |
| 59 | +
|
| 60 | +> **Position**: named |
| 61 | +
|
| 62 | +> **PipelineInput**:true (ByValue) |
| 63 | +
|
| 64 | + |
| 65 | + |
| 66 | +--- |
| 67 | +#### **RemovePropertyPrefix** |
| 68 | + |
| 69 | +One or more property prefixes to remove. |
| 70 | +Properties that start with this prefix will become parameters without the prefix. |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | +> **Type**: ```[String[]]``` |
| 75 | +
|
| 76 | +> **Required**: false |
| 77 | +
|
| 78 | +> **Position**: named |
| 79 | +
|
| 80 | +> **PipelineInput**:false |
| 81 | +
|
| 82 | + |
| 83 | + |
| 84 | +--- |
| 85 | +#### **ExcludeProperty** |
| 86 | + |
| 87 | +One or more properties to ignore. |
| 88 | +Properties whose name or description is like this keyword will be ignored. |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | +> **Type**: ```[String[]]``` |
| 93 | +
|
| 94 | +> **Required**: false |
| 95 | +
|
| 96 | +> **Position**: named |
| 97 | +
|
| 98 | +> **PipelineInput**:false |
| 99 | +
|
| 100 | + |
| 101 | + |
| 102 | +--- |
| 103 | +#### **IncludeProperty** |
| 104 | + |
| 105 | +One or more properties to include. |
| 106 | +Properties whose name or description is like this keyword will be included. |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | +> **Type**: ```[String[]]``` |
| 111 | +
|
| 112 | +> **Required**: false |
| 113 | +
|
| 114 | +> **Position**: named |
| 115 | +
|
| 116 | +> **PipelineInput**:false |
| 117 | +
|
| 118 | + |
| 119 | + |
| 120 | +--- |
| 121 | +#### **NoMandatory** |
| 122 | + |
| 123 | +If set, will not mark a parameter as required, even if the schema indicates it should be. |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | +> **Type**: ```[Switch]``` |
| 128 | +
|
| 129 | +> **Required**: false |
| 130 | +
|
| 131 | +> **Position**: named |
| 132 | +
|
| 133 | +> **PipelineInput**:false |
| 134 | +
|
| 135 | + |
| 136 | + |
| 137 | +--- |
| 138 | +### Syntax |
| 139 | +```PowerShell |
| 140 | +JSONSchema.Protocol -SchemaUri <Uri> -ScriptBlock <ScriptBlock> [-RemovePropertyPrefix <String[]>] [-ExcludeProperty <String[]>] [-IncludeProperty <String[]>] [-NoMandatory] [<CommonParameters>] |
| 141 | +``` |
| 142 | +```PowerShell |
| 143 | +JSONSchema.Protocol -SchemaUri <Uri> -CommandAst <CommandAst> [-RemovePropertyPrefix <String[]>] [-ExcludeProperty <String[]>] [-IncludeProperty <String[]>] [-NoMandatory] [<CommonParameters>] |
| 144 | +``` |
| 145 | +--- |
| 146 | + |
0 commit comments