Skip to content

Commit d813fe5

Browse files
committed
feat: add OpenAPI description for RES
Signed-off-by: Mats Johansson <extern.mats.johansson@digg.se>
1 parent 37ebe5e commit d813fe5

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

apis/res-api.yaml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
2+
#
3+
# SPDX-License-Identifier: EUPL-1.2
4+
5+
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
6+
#
7+
# SPDX-License-Identifier: EUPL-1.2
8+
9+
openapi: '3.0.0'
10+
info:
11+
title: RES
12+
version: 1.0.0
13+
paths:
14+
/pets:
15+
get:
16+
operationId: listPets
17+
parameters:
18+
- name: limit
19+
in: query
20+
description: Max number of items to return
21+
required: false
22+
schema:
23+
type: integer
24+
maximum: 100
25+
responses:
26+
'200':
27+
description: OK
28+
content:
29+
application/json:
30+
schema:
31+
$ref: '#/components/schemas/Pets'
32+
post:
33+
operationId: createPets
34+
requestBody:
35+
content:
36+
application/json:
37+
schema:
38+
type: object
39+
properties:
40+
id:
41+
type: integer
42+
name:
43+
type: string
44+
responses:
45+
'201':
46+
description: Created
47+
/pets/{petId}:
48+
get:
49+
operationId: showPetById
50+
parameters:
51+
- name: petId
52+
in: path
53+
required: true
54+
description: ID of the pet to retrieve
55+
schema:
56+
type: integer
57+
responses:
58+
'200':
59+
description: OK
60+
content:
61+
application/json:
62+
schema:
63+
$ref: '#/components/schemas/Pet'
64+
delete:
65+
operationId: deletePet
66+
parameters:
67+
- name: petId
68+
in: path
69+
required: true
70+
schema:
71+
type: integer
72+
responses:
73+
'204':
74+
description: Deleted
75+
components:
76+
schemas:
77+
Pet:
78+
type: object
79+
required:
80+
- id
81+
- name
82+
properties:
83+
id:
84+
type: integer
85+
name:
86+
type: string
87+
tag:
88+
type: string
89+
Pets:
90+
type: array
91+
items:
92+
$ref: '#/components/schemas/Pet'

0 commit comments

Comments
 (0)