Skip to content

ConvertTo-PodeOAParameter

SYNOPSIS

Converts an OpenAPI property into a Request Parameter.

SYNTAX

Reference (Default)

ConvertTo-PodeOAParameter -Reference <String> [<CommonParameters>]

Schema

ConvertTo-PodeOAParameter -In <String> -Property <Hashtable> [<CommonParameters>]

DESCRIPTION

Converts an OpenAPI property (such as from New-PodeOAIntProperty) into a Request Parameter.

EXAMPLES

EXAMPLE 1

New-PodeOAIntProperty -Name 'userId' | ConvertTo-PodeOAParameter -In Query

EXAMPLE 2

ConvertTo-PodeOAParameter -Reference 'UserIdParam'

PARAMETERS

-In

Where in the Request can the parameter be found?

Type: String
Parameter Sets: Schema
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Property

The Property that need converting (such as from New-PodeOAIntProperty).

Type: Hashtable
Parameter Sets: Schema
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Reference

The name of an existing component parameter to be reused.

Type: String
Parameter Sets: Reference
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
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

OUTPUTS

NOTES