Skip to content

Commit

Permalink
feat: Added default built-in search
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Jun 24, 2022
1 parent a73f0bb commit 4c2d5dc
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
27 changes: 26 additions & 1 deletion config/api_resources/nodes_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,32 @@ RZ\Roadiz\CoreBundle\Entity\NodesSources:
- translation_base
- document_display
- position

search:
method: 'GET'
path: '/nodes_sources/search'
controller: RZ\Roadiz\CoreBundle\Api\Controller\NodesSourcesSearchController
read: false
normalization_context:
groups:
- get
- nodes_sources_base
- nodes_sources_default
- urls
- tag_base
- translation_base
- document_display
openapi_context:
summary: Search NodesSources resources
description: |
Search all website NodesSources resources using **Solr** full-text search engine
parameters:
- type: string
name: search
in: query
required: true
description: Search pattern
schema:
type: string
itemOperations:
get:
method: 'GET'
Expand Down
1 change: 1 addition & 0 deletions config/api_resources/nsarticle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ App\GeneratedEntity\NSArticle:
read: false
controller: RZ\Roadiz\CoreBundle\Api\Controller\NodesSourcesArchivesController
pagination_enabled: false
output: RZ\Roadiz\CoreBundle\Api\Dto\Archive
defaults:
resource_date_field: publishedAt
normalization_context:
Expand Down

0 comments on commit 4c2d5dc

Please sign in to comment.