Skip to content

Write-Verbose failing #17

Closed
Closed
@jeffpatton1971

Description

@jeffpatton1971

when $schemadocument is passed along the pipeline, verbose works, but is failing when passed in via parameter

# JeffreyPatton@FSTNQL1 | 11:38:50 | 09-09-2020 | [23.78GB] D:\CODE\Organizations\SchemaModule\PowerShell $  [issue-15 ↑3]
$SchemaDocument.properties.products.items.anyOf |Get-SchemaProperty -Name checked -Verbose
VERBOSE: @{$id=#/properties/products/items/anyOf/0; type=object; title=The first anyOf schema; description=An explanation about the purpose of this instance.; default=; examples=System.Object[]; required=System.Object[]; properties=; additionalProperties=True}
VERBOSE: checked
VERBOSE: Return specific Property


$id         : #/properties/products/items/anyOf/0/properties/checked
type        : boolean
title       : The checked schema
description : An explanation about the purpose of this instance.
default     : False
examples    : {False}



# JeffreyPatton@FSTNQL1 | 11:38:53 | 09-09-2020 | [23.78GB] D:\CODE\Organizations\SchemaModule\PowerShell $  [issue-15 ↑3]
Get-SchemaProperty -SchemaDocument $SchemaDocument.properties.products.items.anyOf -Name dimensions -Verbose
Write-Verbose : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'Message'. Specified method is not supported.
At D:\CODE\Organizations\SchemaModule\PowerShell\schema\schema.psm1:134 char:19
+     Write-Verbose $SchemaDocument;
+                   ~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Write-Verbose], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.PowerShell.Commands.WriteVerboseCommand

VERBOSE: dimensions
VERBOSE: Return specific Property


$id                  : #/properties/products/items/anyOf/0/properties/dimensions
type                 : object
title                : The dimensions schema
description          : An explanation about the purpose of this instance.
default              :
examples             : {@{width=5; height=10}}
required             : {width, height}
properties           : @{width=; height=}
additionalProperties : True

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions