Skip to content

Commit e2cf897

Browse files
committed
Updated API spec
1 parent 94aa0ec commit e2cf897

2 files changed

Lines changed: 305 additions & 0 deletions

File tree

public/api-spec-v1.json

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,144 @@
9292
"required": true
9393
}
9494
}
95+
},
96+
"/api/servers": {
97+
"get": {
98+
"operationId": "api_servers_get_collection",
99+
"tags": [
100+
"Server"
101+
],
102+
"responses": {
103+
"200": {
104+
"description": "Server collection",
105+
"content": {
106+
"application/json": {
107+
"schema": {
108+
"type": "array",
109+
"items": {
110+
"$ref": "#/components/schemas/Server-export"
111+
}
112+
}
113+
},
114+
"application/ld+json": {
115+
"schema": {
116+
"type": "array",
117+
"items": {
118+
"$ref": "#/components/schemas/Server-export"
119+
}
120+
}
121+
}
122+
}
123+
},
124+
"403": {
125+
"description": "Forbidden",
126+
"content": {
127+
"application/ld+json": {
128+
"schema": {
129+
"$ref": "#/components/schemas/Error.jsonld"
130+
}
131+
},
132+
"application/problem+json": {
133+
"schema": {
134+
"$ref": "#/components/schemas/Error"
135+
}
136+
},
137+
"application/json": {
138+
"schema": {
139+
"$ref": "#/components/schemas/Error"
140+
}
141+
}
142+
},
143+
"links": {}
144+
}
145+
},
146+
"summary": "Retrieves the collection of Server resources.",
147+
"description": "Retrieves the collection of Server resources.",
148+
"parameters": [
149+
{
150+
"name": "page",
151+
"in": "query",
152+
"description": "The collection page number",
153+
"required": false,
154+
"deprecated": false,
155+
"schema": {
156+
"type": "integer",
157+
"default": 1
158+
},
159+
"style": "form",
160+
"explode": true
161+
}
162+
]
163+
}
164+
},
165+
"/api/sites": {
166+
"get": {
167+
"operationId": "api_sites_get_collection",
168+
"tags": [
169+
"Site"
170+
],
171+
"responses": {
172+
"200": {
173+
"description": "Site collection",
174+
"content": {
175+
"application/json": {
176+
"schema": {
177+
"type": "array",
178+
"items": {
179+
"$ref": "#/components/schemas/Site-export"
180+
}
181+
}
182+
},
183+
"application/ld+json": {
184+
"schema": {
185+
"type": "array",
186+
"items": {
187+
"$ref": "#/components/schemas/Site-export"
188+
}
189+
}
190+
}
191+
}
192+
},
193+
"403": {
194+
"description": "Forbidden",
195+
"content": {
196+
"application/ld+json": {
197+
"schema": {
198+
"$ref": "#/components/schemas/Error.jsonld"
199+
}
200+
},
201+
"application/problem+json": {
202+
"schema": {
203+
"$ref": "#/components/schemas/Error"
204+
}
205+
},
206+
"application/json": {
207+
"schema": {
208+
"$ref": "#/components/schemas/Error"
209+
}
210+
}
211+
},
212+
"links": {}
213+
}
214+
},
215+
"summary": "Retrieves the collection of Site resources.",
216+
"description": "Retrieves the collection of Site resources.",
217+
"parameters": [
218+
{
219+
"name": "page",
220+
"in": "query",
221+
"description": "The collection page number",
222+
"required": false,
223+
"deprecated": false,
224+
"schema": {
225+
"type": "integer",
226+
"default": 1
227+
},
228+
"style": "form",
229+
"explode": true
230+
}
231+
]
232+
}
95233
}
96234
},
97235
"components": {
@@ -353,6 +491,43 @@
353491
]
354492
}
355493
}
494+
},
495+
"Server-export": {
496+
"type": "object",
497+
"properties": {
498+
"Name": {
499+
"default": "",
500+
"type": "string"
501+
}
502+
}
503+
},
504+
"Site-export": {
505+
"type": "object",
506+
"required": [
507+
"PHP version"
508+
],
509+
"properties": {
510+
"PHP version": {
511+
"minLength": 1,
512+
"maxLength": 10,
513+
"default": "",
514+
"type": "string"
515+
},
516+
"Primary domain": {
517+
"readOnly": true,
518+
"type": "string"
519+
},
520+
"Type": {
521+
"default": "",
522+
"type": "string"
523+
},
524+
"Server": {
525+
"$ref": "#/components/schemas/Server-export"
526+
},
527+
"rootDir": {
528+
"type": "string"
529+
}
530+
}
356531
}
357532
},
358533
"responses": {},
@@ -378,6 +553,14 @@
378553
{
379554
"name": "DetectionResult",
380555
"description": "Resource 'DetectionResult' operations."
556+
},
557+
{
558+
"name": "Server",
559+
"description": "Resource 'Server' operations."
560+
},
561+
{
562+
"name": "Site",
563+
"description": "Resource 'Site' operations."
381564
}
382565
],
383566
"webhooks": {}

public/api-spec-v1.yaml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,98 @@ paths:
5959
schema:
6060
$ref: '#/components/schemas/DetectionResult-write'
6161
required: true
62+
/api/servers:
63+
get:
64+
operationId: api_servers_get_collection
65+
tags:
66+
- Server
67+
responses:
68+
'200':
69+
description: 'Server collection'
70+
content:
71+
application/json:
72+
schema:
73+
type: array
74+
items:
75+
$ref: '#/components/schemas/Server-export'
76+
application/ld+json:
77+
schema:
78+
type: array
79+
items:
80+
$ref: '#/components/schemas/Server-export'
81+
'403':
82+
description: Forbidden
83+
content:
84+
application/ld+json:
85+
schema:
86+
$ref: '#/components/schemas/Error.jsonld'
87+
application/problem+json:
88+
schema:
89+
$ref: '#/components/schemas/Error'
90+
application/json:
91+
schema:
92+
$ref: '#/components/schemas/Error'
93+
links: {}
94+
summary: 'Retrieves the collection of Server resources.'
95+
description: 'Retrieves the collection of Server resources.'
96+
parameters:
97+
-
98+
name: page
99+
in: query
100+
description: 'The collection page number'
101+
required: false
102+
deprecated: false
103+
schema:
104+
type: integer
105+
default: 1
106+
style: form
107+
explode: true
108+
/api/sites:
109+
get:
110+
operationId: api_sites_get_collection
111+
tags:
112+
- Site
113+
responses:
114+
'200':
115+
description: 'Site collection'
116+
content:
117+
application/json:
118+
schema:
119+
type: array
120+
items:
121+
$ref: '#/components/schemas/Site-export'
122+
application/ld+json:
123+
schema:
124+
type: array
125+
items:
126+
$ref: '#/components/schemas/Site-export'
127+
'403':
128+
description: Forbidden
129+
content:
130+
application/ld+json:
131+
schema:
132+
$ref: '#/components/schemas/Error.jsonld'
133+
application/problem+json:
134+
schema:
135+
$ref: '#/components/schemas/Error'
136+
application/json:
137+
schema:
138+
$ref: '#/components/schemas/Error'
139+
links: {}
140+
summary: 'Retrieves the collection of Site resources.'
141+
description: 'Retrieves the collection of Site resources.'
142+
parameters:
143+
-
144+
name: page
145+
in: query
146+
description: 'The collection page number'
147+
required: false
148+
deprecated: false
149+
schema:
150+
type: integer
151+
default: 1
152+
style: form
153+
explode: true
62154
components:
63155
schemas:
64156
ConstraintViolation:
@@ -250,6 +342,32 @@ components:
250342
type:
251343
- string
252344
- 'null'
345+
Server-export:
346+
type: object
347+
properties:
348+
Name:
349+
default: ''
350+
type: string
351+
Site-export:
352+
type: object
353+
required:
354+
- 'PHP version'
355+
properties:
356+
'PHP version':
357+
minLength: 1
358+
maxLength: 10
359+
default: ''
360+
type: string
361+
'Primary domain':
362+
readOnly: true
363+
type: string
364+
Type:
365+
default: ''
366+
type: string
367+
Server:
368+
$ref: '#/components/schemas/Server-export'
369+
rootDir:
370+
type: string
253371
responses: {}
254372
parameters: {}
255373
examples: {}
@@ -267,4 +385,8 @@ security:
267385
tags:
268386
- name: DetectionResult
269387
description: "Resource 'DetectionResult' operations."
388+
- name: Server
389+
description: "Resource 'Server' operations."
390+
- name: Site
391+
description: "Resource 'Site' operations."
270392
webhooks: {}

0 commit comments

Comments
 (0)