diff --git a/config/api_resources/nodes_sources.yml b/config/api_resources/nodes_sources.yml index 055b2ca1..ce59bc0c 100644 --- a/config/api_resources/nodes_sources.yml +++ b/config/api_resources/nodes_sources.yml @@ -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' diff --git a/config/api_resources/nsarticle.yml b/config/api_resources/nsarticle.yml index 1e9525e5..48753385 100644 --- a/config/api_resources/nsarticle.yml +++ b/config/api_resources/nsarticle.yml @@ -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: