YAML OpenAPI 3 Specification
YAML OpenAPI 3 Specification
YAML OpenAPI 3 Specification
info:
version: '1.0.0'
paths:
/articles/{articleId}/comments/:
get:
description: Returns a list of comments along with user details for display.
parameters:
- name: articleId
in: path
required: true
schema:
type: string
- name: limit
in: query
required: false
schema:
type: integer
default: 10
- name: offset
in: query
required: false
schema:
type: integer
default: 0
responses:
'200':
content:
application/json:
schema:
type: object
properties:
comments:
type: array
items:
type: object
properties:
commentId:
type: string
text:
type: string
timestamp:
type: string
format: date-time
user:
type: object
properties:
userId:
type: string
name:
type: string
profilePicture:
type: string
format: uri
'400':
content:
application/json:
schema:
type: object
properties:
error:
type: string
'404':
content:
application/json:
schema:
type: object
properties:
error:
type: string
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-KEY
security:
- ApiKeyAuth: []