Added search endpoint
This commit is contained in:
61
api.yaml
61
api.yaml
@@ -6,7 +6,7 @@ info:
|
|||||||
servers:
|
servers:
|
||||||
- url: 'https://localhost:8080'
|
- url: 'https://localhost:8080'
|
||||||
paths:
|
paths:
|
||||||
/recent:
|
/api/recent:
|
||||||
get:
|
get:
|
||||||
summary: Get recent articles
|
summary: Get recent articles
|
||||||
parameters:
|
parameters:
|
||||||
@@ -21,17 +21,48 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: '#/components/schemas/ArticleSummary'
|
||||||
properties:
|
|
||||||
title:
|
/api/search:
|
||||||
type: string
|
get:
|
||||||
description: Title of the article
|
summary: Search all articles
|
||||||
summary:
|
parameters:
|
||||||
type: string
|
- in: query
|
||||||
description: A short overview summary of the article
|
name: q
|
||||||
image:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
description: Link to a preview image
|
description: Name of the article to search
|
||||||
link:
|
- in: query
|
||||||
type: string
|
name: from
|
||||||
description: Link to the article itself
|
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:
|
||||||
|
type: string
|
||||||
|
description: Title of the article
|
||||||
|
summary:
|
||||||
|
type: string
|
||||||
|
description: A short overview summary of the article
|
||||||
|
image:
|
||||||
|
type: string
|
||||||
|
description: Link to a preview image
|
||||||
|
link:
|
||||||
|
type: string
|
||||||
|
description: Link to the article itself
|
||||||
|
|||||||
Reference in New Issue
Block a user