Add-KrOpenApiServer
SYNOPSIS
Creates a new OpenAPI server.
SYNTAX
__AllParameterSets
Add-KrOpenApiServer [[-Server] <KestrunHost>] [[-DocId] <string[]>] [-Url] <string>
[[-Description] <string>] [[-Variables] <ordered>] [<CommonParameters>]
ALIASES
This cmdlet has the following aliases, {{Insert list of aliases}}
DESCRIPTION
This function creates a new OpenAPI server using the provided parameters.
EXAMPLES
EXAMPLE 1
$variables = @{ env = New-KrOpenApiServerVariable -Default ‘dev’ -Enum @(‘dev’, ‘staging’, ‘prod’) -Description ‘Environment name’ } $oaServer = New-KrOpenApiServer -Description ‘My API Server’ -Url ‘https://api.example.com’ -Variables $variables
PARAMETERS
-Description
A description of the server.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 3
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-DocId
The documentation IDs to which this server will be added.
Type: System.String[]
DefaultValue: '[Kestrun.Authentication.IOpenApiAuthenticationOptions]::DefaultDocumentationIds'
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Server
The Kestrun server instance to which the OpenAPI server will be added. If not specified, the function will attempt to resolve the current server context.
Type: Kestrun.Hosting.KestrunHost
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Url
The URL of the server.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Variables
A dictionary of server variables.
Type: System.Collections.Specialized.OrderedDictionary
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 4
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
Kestrun.Hosting.KestrunHost
{{ Fill in the Description }}
OUTPUTS
NOTES
This cmdlet is part of the Kestrun OpenAPI module.
RELATED LINKS
{{ Fill in the related links here }}