Skip to content

Get-PodeOpenApiDefinition

SYNOPSIS

Gets the OpenAPI definition.

SYNTAX

Get-PodeOpenApiDefinition [[-Title] <String>] [[-Version] <String>] [[-Description] <String>]
 [[-RouteFilter] <String>] [-RestrictRoutes] [<CommonParameters>]

DESCRIPTION

Gets the OpenAPI definition for custom use in routes, or other functions.

EXAMPLES

EXAMPLE 1

$def = Get-PodeOpenApiDefinition -RouteFilter '/api/*'

PARAMETERS

-Description

A Description of the API. (Default: the description supplied into Enable-PodeOpenApi)

Type: String
Parameter Sets: (All)
Aliases:

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

-RestrictRoutes

If supplied, only routes that are available on the Requests URI will be used to generate the OpenAPI definition.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-RouteFilter

An optional route filter for routes that should be included in the definition. (Default: /*)

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: /*
Accept pipeline input: False
Accept wildcard characters: False

-Title

The Title of the API. (Default: the title supplied in Enable-PodeOpenApi)

Type: String
Parameter Sets: (All)
Aliases:

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

-Version

The Version of the API. (Default: the version supplied in Enable-PodeOpenApi)

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
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