11{
2- "openapi" : " 3.0.0" ,
3- "info" : {
4- "title" : " Storyblok API Schema and Validation POC" ,
5- "description" : " Storyblok API Schema and Validation POC." ,
6-
7- "version" : " 1.0.1"
8- },
9- "host" : " localhost:3000" ,
10- "schemes" : [
11- " http" ,
12- " https"
13- ],
14- "consumes" : [
15- " application/json"
16- ],
17- "produces" : [
18- " application/json"
19- ],
20- "paths" : {
21- "comments" :
22- {
23- "get" :
24- {
25- "summary" : " Returns a list of stories for a given space" ,
26- "description" : " A simple endpoint that returns a JSON response with a list of stories for the specified space." ,
27- "parameters" :
28- [
29- {
30- "name" : " space_id" ,
31- "in" : " path" ,
32- "required" : true ,
33- "description" : " The ID of the space" ,
34- "schema" : { "type" : " string" }
35- }
36- ],
37- "responses" :
38- {
39- "200" :
40- {
41- "description" : " A successful response" ,
42- "content" :
43- {
44- "application/json" :
45- {
46- "schema" :
47- {
48- "type" : " object" ,
49- "properties" :
50- {
51- "stories" :
52- {
53- "type" : " array" ,
54- "items" :
55- {
56- "type" : " object" ,
57- "properties" :
58- {
59- "id" : { "type" : " string" },
60- "title" : { "type" : " string" },
61- "content" :
62- { "type" : " string" }
63- }
64- }
65- }
66- }
67- }
68- }
2+ "openapi" : " 3.0.0" ,
3+ "info" : {
4+ "title" : " Storyblok API Schema and Validation POC" ,
5+ "description" : " Storyblok API Schema and Validation POC." ,
6+
7+ "version" : " 1.0.1"
8+ },
9+ "host" : " localhost:3000" ,
10+ "schemes" : [" http" , " https" ],
11+ "consumes" : [" application/json" ],
12+ "produces" : [" application/json" ],
13+ "paths" : {
14+ "/comments" : {
15+ "get" : {
16+ "summary" : " Returns a list of comments" ,
17+ "description" : " A simple endpoint that returns a JSON response with a list of comments." ,
18+ "responses" : {
19+ "200" : {
20+ "description" : " A successful response" ,
21+ "content" : {
22+ "application/json" : {
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" }
6933 }
34+ }
7035 }
36+ }
37+ }
38+ }
39+ }
40+ }
41+ }
42+ },
43+ "post" : {
44+ "summary" : " Creates a new comment" ,
45+ "description" : " A simple endpoint that creates a new comment." ,
46+ "requestBody" : {
47+ "required" : true ,
48+ "content" : {
49+ "application/json" : {
50+ "schema" : {
51+ "type" : " object" ,
52+ "properties" : {
53+ "message" : { "type" : " string" }
54+ },
55+ "required" : [" message" ]
56+ }
57+ }
58+ }
59+ },
60+ "responses" : {
61+ "201" : {
62+ "description" : " Comment created successfully" ,
63+ "content" : {
64+ "application/json" : {
65+ "schema" : {
66+ "type" : " object" ,
67+ "properties" : {
68+ "id" : { "type" : " string" },
69+ "message" : { "type" : " string" }
70+ }
7171 }
72+ }
7273 }
74+ }
75+ }
76+ }
77+ },
78+ "/comments/{comment_id}" : {
79+ "get" : {
80+ "summary" : " Returns a specific comment" ,
81+ "description" : " A simple endpoint that returns a JSON response with a specific comment." ,
82+ "parameters" : [
83+ {
84+ "name" : " comment_id" ,
85+ "in" : " path" ,
86+ "required" : true ,
87+ "description" : " The ID of the comment" ,
88+ "schema" : { "type" : " string" }
89+ }
90+ ],
91+ "responses" : {
92+ "200" : {
93+ "description" : " A successful response" ,
94+ "content" : {
95+ "application/json" : {
96+ "schema" : {
97+ "type" : " object" ,
98+ "properties" : {
99+ "id" : { "type" : " string" },
100+ "message" : { "type" : " string" }
101+ }
102+ }
103+ }
104+ }
105+ }
106+ }
107+ },
108+ "put" : {
109+ "summary" : " Updates a specific comment" ,
110+ "description" : " A simple endpoint that updates a specific comment." ,
111+ "parameters" : [
112+ {
113+ "name" : " comment_id" ,
114+ "in" : " path" ,
115+ "required" : true ,
116+ "description" : " The ID of the comment" ,
117+ "schema" : { "type" : " string" }
118+ }
119+ ],
120+ "requestBody" : {
121+ "required" : true ,
122+ "content" : {
123+ "application/json" : {
124+ "schema" : {
125+ "type" : " object" ,
126+ "properties" : {
127+ "message" : { "type" : " string" }
128+ },
129+ "required" : [" message" ]
130+ }
131+ }
132+ }
133+ },
134+ "responses" : {
135+ "200" : {
136+ "description" : " Comment updated successfully" ,
137+ "content" : {
138+ "application/json" : {
139+ "schema" : {
140+ "type" : " object" ,
141+ "properties" : {
142+ "id" : { "type" : " string" },
143+ "message" : { "type" : " string" }
144+ }
145+ }
146+ }
147+ }
148+ }
149+ }
150+ },
151+ "delete" : {
152+ "summary" : " Deletes a specific comment" ,
153+ "description" : " A simple endpoint that deletes a specific comment." ,
154+ "parameters" : [
155+ {
156+ "name" : " comment_id" ,
157+ "in" : " path" ,
158+ "required" : true ,
159+ "description" : " The ID of the comment" ,
160+ "schema" : { "type" : " string" }
161+ }
162+ ],
163+ "responses" : {
164+ "204" : {
165+ "description" : " Comment deleted successfully"
166+ }
73167 }
168+ }
74169 }
75- }
170+ }
171+ }
0 commit comments