Skip to content

Collection: default search param values #361

@tpluscode

Description

@tpluscode

It should be possible to set default value for search template params, similar to sh:defaultValue, so that when a parameter is not provided in the query by a client, the filter will be applied nonetheless

<collection>  hydra:search
    [
      rdfs:label "Search" ;
      hydra:template "{?onlyClosed}" ;
      hydra:variableRepresentation hydra:ExplicitRepresentation ;
      hydra:mapping
        [
          a hydra:IriTemplateMapping ;
          hydra:variable "onlyClosed" ;
          hydra:property </api/bus#unmatched> ;
+         query:defaultValue true ;
          query:filter
            [
              a code:EcmaScript ;
              code:link <node:@pks/filter#onlyClosed> ;
            ] ;
        ] ;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions