Skip to content

Instantly share code, notes, and snippets.

@kplaube

kplaube/openapi.yaml

Last active Mar 1, 2020
Embed
What would you like to do?
Feedly-clone API Spec
openapi: "3.0.2"
info:
title: Feedly-clone
version: v1
paths:
/channels:
summary: Set of channels, e.g. blogs, websites or podcasts
get:
responses:
"200":
description: List of channels
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Channel"
examples:
default:
value: [{ id: 1, name: "Jovem Nerd" }]
/channels/{channelId}:
summary: Details of a channel
get:
parameters:
- $ref: "#/components/parameters/channelId"
responses:
"200":
description: Channel detail response
content:
application/json:
schema:
$ref: "#/components/schemas/Channel"
examples:
default:
value:
id: 1
name: "Jovem Nerd"
/channels/{channelId}/items:
summary: Set of items
get:
parameters:
- $ref: "#/components/parameters/channelId"
responses:
"200":
description: List of items
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Item"
examples:
default:
value:
[
{
id: 1,
title: "Anthony Mackie fala sobre se tornar o Capitão América",
pub_date: "Sat, 29 Feb 2020 19:21:37 +0000",
summary: "Quero que o meu Capitão América represente todo mundo, não só um grupo específico de pessoas",
image: "https://uploads.jovemnerd.com.br/wp-content/uploads/2020/02/anthony-mackie-capitao-america.jpg",
},
]
/channels/{channelId}/items/{itemId}:
summary: Details of an item
get:
parameters:
- $ref: "#/components/parameters/channelId"
- $ref: "#/components/parameters/itemId"
responses:
"200":
description: Item detail response
content:
application/json:
schema:
$ref: "#/components/schemas/ItemDetail"
examples:
default:
value:
id: 1
title: Anthony Mackie fala sobre se tornar o Capitão América
pub_date: Sat, 29 Feb 2020 19:21:37 +0000
summary: Quero que o meu Capitão América represente todo mundo, não só um grupo específico de pessoas
image: https://uploads.jovemnerd.com.br/wp-content/uploads/2020/02/anthony-mackie-capitao-america.jpg
content: Conteúdo completo
url: https://jovemnerd.com.br/nerdbunker/anthony-mackie-fala-sobre-se-tornar-o-capitao-america/
components:
parameters:
channelId:
name: channelId
in: path
required: true
schema:
type: integer
example: 1
itemId:
name: itemId
in: path
required: true
schema:
type: integer
example: 1
schemas:
Channel:
type: object
required:
- id
- name
properties:
id:
type: integer
name:
type: string
Item:
type: object
properties:
id:
type: integer
title:
type: string
pub_date:
type: string
summary:
type: string
image:
type: string
ItemDetail:
allOf:
- $ref: "#/components/schemas/Item"
- properties:
content:
type: string
url:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.