[V14] Allow specifying ID on the create package endpoint (#16203)
* Allow package creation to specify the ID * update openapi --------- Co-authored-by: Sven Geusens <sge@umbraco.dk>
This commit is contained in:
@@ -30,7 +30,7 @@ internal class PackagePresentationFactory : IPackagePresentationFactory
|
||||
|
||||
// Temp Id, PackageId and PackagePath for the newly created package
|
||||
packageDefinition.Id = 0;
|
||||
packageDefinition.PackageId = Guid.Empty;
|
||||
packageDefinition.PackageId = createPackageRequestModel.Id ?? Guid.Empty;
|
||||
packageDefinition.PackagePath = string.Empty;
|
||||
|
||||
return packageDefinition;
|
||||
|
||||
@@ -33936,6 +33936,11 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -43991,4 +43996,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,4 +2,5 @@ namespace Umbraco.Cms.Api.Management.ViewModels.Package;
|
||||
|
||||
public class CreatePackageRequestModel : PackageModelBase
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user