Skip to content

Commit

Permalink
feat: Use definitive archives endpoint configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Jul 5, 2022
1 parent 34b5d5b commit a894b5a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
16 changes: 16 additions & 0 deletions config/api_resources/nodes_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ RZ\Roadiz\CoreBundle\Entity\NodesSources:
- translation_base
- document_display
- position
archives:
method: 'GET'
path: '/nodes_sources/archives'
pagination_enabled: false
pagination_client_enabled: false
archive_enabled: true
archive_publication_field_name: publishedAt
normalization_context:
groups:
- get
- archives
openapi_context:
summary: Get available NodesSources archives
parameters: ~
description: |
Get available NodesSources archives (years and months) based on their `publishedAt` field
search:
method: 'GET'
path: '/nodes_sources/search'
Expand Down
8 changes: 3 additions & 5 deletions config/api_resources/nsarticle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ App\GeneratedEntity\NSArticle:
archives:
method: 'GET'
path: '/articles/archives'
read: false
controller: RZ\Roadiz\CoreBundle\Api\Controller\NodesSourcesArchivesController
pagination_enabled: false
output: RZ\Roadiz\CoreBundle\Api\Dto\Archive
defaults:
resource_date_field: publishedAt
pagination_client_enabled: false
archive_enabled: true
archive_publication_field_name: publishedAt
normalization_context:
pagination_enabled: false
groups:
Expand Down

0 comments on commit a894b5a

Please sign in to comment.