Skip to content

Add Template Keyword Search via GET /templates?keywords #46

@Marvinrose

Description

@Marvinrose

The GET /templates endpoint supports pagination and partial fetching, but lacks a way to search templates by their keywords field. Adding a keywords query param (e.g., ?keywords=contract,legal) would enable efficient server-side filtering.

Proposed Solution

  • Update GET /templates in openapi.json with an optional keywords param.
  • Param: ?keywords=tag1,tag2 (comma-separated, matches any keyword in Template.keywords).
  • Response: Paginated array of matching Template objects..
  • Example: GET /templates?keywords=contract,legal&limit=10 returns templates tagged with "contract" or "legal".
  • Document in specification.md with examples.

Benefits

  • Reduces client-side filtering overhead for large template sets.
  • Leverages existing keywords field in Template schema.

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