Skip to content

New-PodeOAIntProperty

SYNOPSIS

Creates a new OpenAPI integer property.

SYNTAX

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

DESCRIPTION

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

EXAMPLES

EXAMPLE 1

New-PodeOANumberProperty -Name 'age' -Required

PARAMETERS

-Array

If supplied, the integer will be treated as an array of integers.

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: Int32
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: Int32[]
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 integer. (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 integer. (Default: Int.Max)

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: 2147483647
Accept pipeline input: False
Accept wildcard characters: False

-Minimum

The minimum value of the integer. (Default: Int.Min)

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: -2147483648
Accept pipeline input: False
Accept wildcard characters: False

-MultiplesOf

The integer must be in multiples of the supplied value.

Type: Int32
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 integer 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