Skip to content

Commit 8918d49

Browse files
Updated to Controllers/Document controllers (#20917)
* [ADD] Cultures Summary and Description * tidy up from previous merge issue * update wording on notifications controller * UpdateDomainsController wording update * Update the UpdateNotificationsController description / summary * UpdatePublicAccessDocumentController update * naming Document Blueprint as referenced in the Docs * renaming Document Blueprint to match Group Name * Document Blueprint updates * Document Type Folder controllers * Document Type Item endpoints
1 parent 1d63fb0 commit 8918d49

27 files changed

+50
-54
lines changed

src/Umbraco.Cms.Api.Management/Controllers/Culture/AllCultureController.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ public AllCultureController(IUmbracoMapper umbracoMapper, ICultureService cultur
2121
_cultureService = cultureService;
2222
}
2323

24-
/// <summary>
25-
/// Returns all cultures available for creating languages.
26-
/// </summary>
27-
/// <returns></returns>
2824
[HttpGet]
2925
[MapToApiVersion("1.0")]
3026
[ProducesResponseType(typeof(PagedViewModel<CultureReponseModel>), StatusCodes.Status200OK)]

src/Umbraco.Cms.Api.Management/Controllers/Document/NotificationsController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public NotificationsController(
3636
[ProducesResponseType(typeof(IEnumerable<DocumentNotificationResponseModel>), StatusCodes.Status200OK)]
3737
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
3838
[EndpointSummary("Gets notifications for a document.")]
39-
[EndpointDescription("Gets the notification settings for the document identified by the provided Id.")]
39+
[EndpointDescription("Gets the notifications for the document identified by the provided Id.")]
4040
public async Task<IActionResult> Notifications(CancellationToken cancellationToken, Guid id)
4141
{
4242
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(

src/Umbraco.Cms.Api.Management/Controllers/Document/UpdateDomainsController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public UpdateDomainsController(IDomainService domainService, IUmbracoMapper umbr
3232
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
3333
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
3434
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)]
35-
[EndpointSummary("Updates a document.")]
36-
[EndpointDescription("Updates a document identified by the provided Id with the details from the request model.")]
35+
[EndpointSummary("Updates the domains for a document.")]
36+
[EndpointDescription("Updates the domains for the document identified by the provided Id with the details from the request model.")]
3737
public async Task<IActionResult> Update(
3838
CancellationToken cancellationToken,
3939
Guid id,

src/Umbraco.Cms.Api.Management/Controllers/Document/UpdateNotificationsController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public UpdateNotificationsController(IContentEditingService contentEditingServic
2626
[HttpPut("{id:guid}/notifications")]
2727
[ProducesResponseType(StatusCodes.Status200OK)]
2828
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
29-
[EndpointSummary("Updates a document.")]
30-
[EndpointDescription("Updates a document identified by the provided Id with the details from the request model.")]
29+
[EndpointSummary("Updates notification subscriptions for a document.")]
30+
[EndpointDescription("Updates which actions the current user is subscribed to receive notifications for on the specified document.")]
3131
public async Task<IActionResult> UpdateNotifications(CancellationToken cancellationToken, Guid id, UpdateDocumentNotificationsRequestModel updateModel)
3232
{
3333
IContent? content = await _contentEditingService.GetAsync(id);

src/Umbraco.Cms.Api.Management/Controllers/Document/UpdatePublicAccessDocumentController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public UpdatePublicAccessDocumentController(
3737
[MapToApiVersion("1.0")]
3838
[ProducesResponseType(StatusCodes.Status200OK)]
3939
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
40-
[EndpointSummary("Updates a document.")]
41-
[EndpointDescription("Updates a document identified by the provided Id with the details from the request model.")]
40+
[EndpointSummary("Updates public access protection for a document.")]
41+
[EndpointDescription("Updates the member protection settings for a document, controlling which members or member groups can access it.")]
4242
public async Task<IActionResult> Update(CancellationToken cancellationToken, Guid id, PublicAccessRequestModel requestModel)
4343
{
4444
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(

src/Umbraco.Cms.Api.Management/Controllers/DocumentBlueprint/ByKeyDocumentBlueprintController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public ByKeyDocumentBlueprintController(IContentBlueprintEditingService contentB
2727
[MapToApiVersion("1.0")]
2828
[ProducesResponseType(typeof(DocumentBlueprintResponseModel), StatusCodes.Status200OK)]
2929
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
30-
[EndpointSummary("Gets a document blueprint.")]
31-
[EndpointDescription("Gets a document blueprint identified by the provided Id.")]
30+
[EndpointSummary("Gets a Document Blueprint.")]
31+
[EndpointDescription("Gets a Document Blueprint identified by the provided Id.")]
3232
public async Task<IActionResult> ByKey(CancellationToken cancellationToken, Guid id)
3333
{
3434
IContent? blueprint = await _contentBlueprintEditingService.GetAsync(id);

src/Umbraco.Cms.Api.Management/Controllers/DocumentBlueprint/CreateDocumentBlueprintController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public CreateDocumentBlueprintController(
3636
[ProducesResponseType(StatusCodes.Status201Created)]
3737
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
3838
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
39-
[EndpointSummary("Creates a new documentblueprint.")]
40-
[EndpointDescription("Creates a new documentblueprint with the configuration specified in the request model.")]
39+
[EndpointSummary("Creates a new Document Blueprint.")]
40+
[EndpointDescription("Creates a new Document Blueprint with the configuration specified in the request model.")]
4141
public async Task<IActionResult> Create(CancellationToken cancellationToken, CreateDocumentBlueprintRequestModel requestModel)
4242
{
4343
ContentBlueprintCreateModel model = _blueprintEditingPresentationFactory.MapCreateModel(requestModel);

src/Umbraco.Cms.Api.Management/Controllers/DocumentBlueprint/CreateDocumentBlueprintFromDocumentController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public CreateDocumentBlueprintFromDocumentController(
4040
[MapToApiVersion("1.0")]
4141
[ProducesResponseType(StatusCodes.Status201Created)]
4242
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
43-
[EndpointSummary("Creates a document blueprint from an existing document.")]
44-
[EndpointDescription("Creates a new document blueprint based on an existing document identified by the provided Id.")]
43+
[EndpointSummary("Creates a Document Blueprint from an existing document.")]
44+
[EndpointDescription("Creates a new Document Blueprint based on an existing document identified by the provided Id.")]
4545
public async Task<IActionResult> CreateFromDocument(CancellationToken cancellationToken, CreateDocumentBlueprintFromDocumentRequestModel fromDocumentRequestModel)
4646
{
4747
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(

src/Umbraco.Cms.Api.Management/Controllers/DocumentBlueprint/DeleteDocumentBlueprintController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public DeleteDocumentBlueprintController(IContentBlueprintEditingService content
2929
[ProducesResponseType(StatusCodes.Status200OK)]
3030
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
3131
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
32-
[EndpointSummary("Deletes a document blueprint.")]
33-
[EndpointDescription("Deletes a document blueprint identified by the provided Id.")]
32+
[EndpointSummary("Deletes a Document Blueprint.")]
33+
[EndpointDescription("Deletes a Document Blueprint identified by the provided Id.")]
3434
public async Task<IActionResult> Delete(CancellationToken cancellationToken, Guid id)
3535
{
3636
Attempt<IContent?, ContentEditingOperationStatus> result = await _contentBlueprintEditingService.DeleteAsync(id, CurrentUserKey(_backOfficeSecurityAccessor));

src/Umbraco.Cms.Api.Management/Controllers/DocumentBlueprint/DocumentBlueprintControllerBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ public abstract class DocumentBlueprintControllerBase : ContentControllerBase
1313
protected IActionResult DocumentBlueprintNotFound()
1414
=> OperationStatusResult(ContentEditingOperationStatus.NotFound, problemDetailsBuilder
1515
=> NotFound(problemDetailsBuilder
16-
.WithTitle("The document blueprint could not be found")
16+
.WithTitle("The Document Blueprint could not be found")
1717
.Build()));
1818
}

0 commit comments

Comments
 (0)