Skip to content

Import-ServyServiceConfig: missing -Name parameter unlike Export-ServyServiceConfig #59

@Christophe-Rogiers

Description

@Christophe-Rogiers

Bug Description

Export-ServyServiceConfig requires a -Name parameter to identify which service to export, but Import-ServyServiceConfig has no -Name parameter. It is unclear how the service is identified during import.

Actual Behavior

Export (lines 853-863):

param(
    [switch] $Quiet,
    [Parameter(Mandatory = $true)]
    [string] $Name,

    [Parameter(Mandatory = $true)]
    [ValidateSet("xml", "json")]
    [string] $ConfigFileType,

    [Parameter(Mandatory = $true)]
    [string] $Path
)

Import (lines 908-915):

param(
    [switch] $Quiet,
    [Parameter(Mandatory = $true)]
    [ValidateSet("xml", "json")]
    [string] $ConfigFileType,

    [Parameter(Mandatory = $true)]
    [string] $Path,
    [switch] $Install
)

Question

If the service name is embedded in the configuration file and the CLI extracts it automatically during import, this is fine — but it should be documented in the .DESCRIPTION or a .NOTES section. Something like:

.NOTES
    The service name is read from the configuration file during import.
    No -Name parameter is needed.

If the CLI does support an optional -Name override during import (e.g. to import a config under a different service name), the parameter should be added for completeness.

Environment

  • PowerShell module: Servy.psm1
  • Affects: Import-ServyServiceConfig function (lines 881-931)

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions