Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ The PowerShell module now automatically uses `GH_TOKEN` or `GITHUB_TOKEN` enviro

## Bug Fixes

<!-- Nothing yet! -->
* Fixed the `useLatest` property in the DSC v3 `Microsoft.WinGet/Package` resource schema to emit a boolean default (`false`) instead of the incorrect string `"false"`.
2 changes: 1 addition & 1 deletion src/AppInstallerCLICore/Commands/DscComposableObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace AppInstaller::CLI
Json::ValueType type,
std::string_view description,
const std::vector<std::string>& enumValues,
const std::optional<std::string>& defaultValue)
const std::optional<Json::Value>& defaultValue)
{
Json::Value& propertiesObject = object["properties"];

Expand Down
4 changes: 2 additions & 2 deletions src/AppInstallerCLICore/Commands/DscComposableObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace AppInstaller::CLI
Json::ValueType type,
std::string_view description,
const std::vector<std::string>& enumValues,
const std::optional<std::string>& defaultValue);
const std::optional<Json::Value>& defaultValue);
}

template <typename PropertyType>
Expand Down Expand Up @@ -224,7 +224,7 @@ namespace AppInstaller::CLI
static std::string_view Name() { return _json_name_; } \
static Resource::LocString Description() { return _description_; } \
static std::vector<std::string> EnumValues() { return std::vector<std::string> _enum_vals_; } \
static std::optional<std::string> Default() { return _default_; } \
static std::optional<Json::Value> Default() { return _default_; } \
std::optional<PropertyType>& _property_name_() { return m_value; } \
const std::optional<PropertyType>& _property_name_() const { return m_value; } \
void _property_name_(std::optional<PropertyType> value) { m_value = std::move(value); } \
Expand Down
2 changes: 1 addition & 1 deletion src/AppInstallerCLICore/Commands/DscPackageResource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace AppInstaller::CLI
WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY_FLAGS(SourceProperty, std::string, Source, "source", DscComposablePropertyFlag::CopyToOutput, Resource::String::DscResourcePropertyDescriptionPackageSource);
WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY(VersionProperty, std::string, Version, "version", Resource::String::DscResourcePropertyDescriptionPackageVersion);
WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY_ENUM(MatchOptionProperty, std::string, MatchOption, "matchOption", Resource::String::DscResourcePropertyDescriptionPackageMatchOption, ({ "equals", "equalsCaseInsensitive", "startsWithCaseInsensitive", "containsCaseInsensitive" }), "equalsCaseInsensitive");
WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY_DEFAULT(UseLatestProperty, bool, UseLatest, "useLatest", Resource::String::DscResourcePropertyDescriptionPackageUseLatest, "false");
WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY_DEFAULT(UseLatestProperty, bool, UseLatest, "useLatest", Resource::String::DscResourcePropertyDescriptionPackageUseLatest, false);
WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY_ENUM(InstallModeProperty, std::string, InstallMode, "installMode", Resource::String::DscResourcePropertyDescriptionPackageInstallMode, ({ "default", "silent", "interactive" }), "silent");
WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY(AcceptAgreementsProperty, bool, AcceptAgreements, "acceptAgreements", Resource::String::DscResourcePropertyDescriptionAcceptAgreements);

Expand Down
Loading