|
1 | 1 | { |
2 | 2 | "openapi": "3.0.0", |
3 | 3 | "info": { |
4 | | - "title": "Storyblok API Schema and Validation POC", |
5 | | - "description": "Storyblok API Schema and Validation POC.", |
| 4 | + "title": "API Schema and Validation POC", |
| 5 | + "description": "API Schema and Validation POC.", |
6 | 6 |
|
7 | 7 | "version": "1.0.1" |
8 | 8 | }, |
|
21 | 21 | "content": { |
22 | 22 | "application/json": { |
23 | 23 | "schema": { |
24 | | - "type": "object", |
25 | | - "properties": { |
26 | | - "comments": { |
27 | | - "type": "array", |
28 | | - "items": { |
29 | | - "type": "object", |
30 | | - "properties": { |
31 | | - "id": { "type": "string" }, |
32 | | - "message": { "type": "string" } |
33 | | - } |
34 | | - } |
| 24 | + "type": "array", |
| 25 | + "items": { |
| 26 | + "type": "object", |
| 27 | + "properties": { |
| 28 | + "id": { "type": "number" }, |
| 29 | + "message": { "type": "string" }, |
| 30 | + "created_at": { "type": "string", "format": "date-time" }, |
| 31 | + "updated_at": { "type": "string", "format": "date-time" } |
35 | 32 | } |
36 | 33 | } |
37 | 34 | } |
|
50 | 47 | "schema": { |
51 | 48 | "type": "object", |
52 | 49 | "properties": { |
53 | | - "message": { "type": "string" } |
54 | | - }, |
55 | | - "required": ["message"] |
| 50 | + "comment": { |
| 51 | + "type": "object", |
| 52 | + "properties": { |
| 53 | + "message": { "type": "string" } |
| 54 | + }, |
| 55 | + "required": ["message"] |
| 56 | + } |
| 57 | + } |
56 | 58 | } |
57 | 59 | } |
58 | 60 | } |
|
65 | 67 | "schema": { |
66 | 68 | "type": "object", |
67 | 69 | "properties": { |
68 | | - "id": { "type": "string" }, |
69 | | - "message": { "type": "string" } |
| 70 | + "id": { "type": "number" }, |
| 71 | + "message": { "type": "string" }, |
| 72 | + "created_at": { "type": "string", "format": "date-time" }, |
| 73 | + "updated_at": { "type": "string", "format": "date-time" } |
70 | 74 | } |
71 | 75 | } |
72 | 76 | } |
|
85 | 89 | "in": "path", |
86 | 90 | "required": true, |
87 | 91 | "description": "The ID of the comment", |
88 | | - "schema": { "type": "string" } |
| 92 | + "schema": { "type": "number" } |
89 | 93 | } |
90 | 94 | ], |
91 | 95 | "responses": { |
|
96 | 100 | "schema": { |
97 | 101 | "type": "object", |
98 | 102 | "properties": { |
99 | | - "id": { "type": "string" }, |
| 103 | + "id": { "type": "number" }, |
100 | 104 | "message": { "type": "string" } |
101 | 105 | } |
102 | 106 | } |
|
124 | 128 | "schema": { |
125 | 129 | "type": "object", |
126 | 130 | "properties": { |
127 | | - "message": { "type": "string" } |
128 | | - }, |
129 | | - "required": ["message"] |
| 131 | + "comment": { |
| 132 | + "type": "object", |
| 133 | + "properties": { |
| 134 | + "message": { "type": "string" } |
| 135 | + }, |
| 136 | + "required": ["message"] |
| 137 | + } |
| 138 | + } |
130 | 139 | } |
131 | 140 | } |
132 | 141 | } |
|
139 | 148 | "schema": { |
140 | 149 | "type": "object", |
141 | 150 | "properties": { |
142 | | - "id": { "type": "string" }, |
| 151 | + "id": { "type": "number" }, |
143 | 152 | "message": { "type": "string" } |
144 | 153 | } |
145 | 154 | } |
|
0 commit comments