Added search endpoint
This commit is contained in:
33
api.yaml
33
api.yaml
@@ -6,7 +6,7 @@ info:
|
||||
servers:
|
||||
- url: 'https://localhost:8080'
|
||||
paths:
|
||||
/recent:
|
||||
/api/recent:
|
||||
get:
|
||||
summary: Get recent articles
|
||||
parameters:
|
||||
@@ -21,6 +21,37 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ArticleSummary'
|
||||
|
||||
/api/search:
|
||||
get:
|
||||
summary: Search all articles
|
||||
parameters:
|
||||
- in: query
|
||||
name: q
|
||||
schema:
|
||||
type: string
|
||||
description: Name of the article to search
|
||||
- in: query
|
||||
name: from
|
||||
schema:
|
||||
type: string
|
||||
description: A RFC3339 formatted date to start searching when articles are older than specified
|
||||
- in: query
|
||||
name: to
|
||||
schema:
|
||||
type: string
|
||||
description: A RFC3339 formatted date to stop searching when articles are older than specified
|
||||
responses:
|
||||
200:
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ArticleSummary'
|
||||
components:
|
||||
schemas:
|
||||
ArticleSummary:
|
||||
type: object
|
||||
properties:
|
||||
title:
|
||||
|
||||
Reference in New Issue
Block a user