Repository navigation
Expand file tree
/
Copy pathopenapi.yaml
More file actions
53 lines (53 loc) · 1.5 KB
/
Copy pathopenapi.yaml
File metadata and controls
53 lines (53 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
openapi: 3.1.0
info:
title: Ham-Mahalleh Marketplace API
version: 0.1.0
description: Public transactional contract; foundation slice.
servers:
- url: http://localhost:8080/api/v1
paths:
/health:
get:
operationId: getHealth
security: []
responses:
'200':
description: Service is ready.
content:
application/json:
schema: { $ref: '#/components/schemas/Health' }
/categories:
get:
operationId: listCategories
security: []
responses:
'200':
description: Versioned public category tree.
content:
application/json:
schema:
type: object
required: [data]
properties:
data: { type: array, items: { $ref: '#/components/schemas/Category' } }
components:
schemas:
Health:
type: object
additionalProperties: false
required: [status, service, version, timestamp]
properties:
status: { const: ok }
service: { type: string }
version: { type: string }
timestamp: { type: string, format: date-time }
Category:
type: object
additionalProperties: false
required: [id, slug, label, icon, children]
properties:
id: { type: string }
slug: { type: string, pattern: '^[a-z0-9-]+$' }
label: { type: string }
icon: { type: string }
children: { type: array, items: { $ref: '#/components/schemas/Category' } }