Skip to content

New-PodeOANumberProperty

SYNOPSIS

Creates a new OpenAPI number property.

SYNTAX

New-PodeOANumberProperty [[-Name] <String>] [[-Format] <String>] [[-Default] <Double>] [[-Minimum] <Double>]
 [[-Maximum] <Double>] [[-MultiplesOf] <Double>] [[-Description] <String>] [[-Enum] <Double[]>] [-Required]
 [-Deprecated] [-Array] [-Object] [<CommonParameters>]

DESCRIPTION

Creates a new OpenAPI number property, for Schemas or Parameters.

EXAMPLES

EXAMPLE 1

New-PodeOANumberProperty -Name 'gravity' -Default 9.8

PARAMETERS

-Array

If supplied, the number will be treated as an array of numbers.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Default

The default value of the property. (Default: 0)

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Deprecated

If supplied, the object will be treated as Deprecated where supported.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Description

A Description of the property.

Type: String
Parameter Sets: (All)
Aliases:

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

-Enum

An optional array of values that this property can only be set to.

Type: Double[]
Parameter Sets: (All)
Aliases:

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

-Format

The inbuilt OpenAPI Format of the number. (Default: Any)

Type: String
Parameter Sets: (All)
Aliases:

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

-Maximum

The maximum value of the number. (Default: Double.Max)

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: 1.79769313486232E+308
Accept pipeline input: False
Accept wildcard characters: False

-Minimum

The minimum value of the number. (Default: Double.Min)

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: -1.79769313486232E+308
Accept pipeline input: False
Accept wildcard characters: False

-MultiplesOf

The number must be in multiples of the supplied value.

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Name

The Name of the property.

Type: String
Parameter Sets: (All)
Aliases:

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

-Object

If supplied, the number will be automatically wrapped in an object.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Required

If supplied, the object will be treated as Required where supported.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
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

Back to top