Skip to content

Commit 481d23b

Browse files
committed
vo-modified-openapi-spec-for-testing
1 parent c9044a8 commit 481d23b

File tree

1 file changed

+159
-17
lines changed

1 file changed

+159
-17
lines changed

src/main/resources/openapi.yaml

Lines changed: 159 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,173 @@
11
openapi: 3.0.3
22
info:
3-
title: Simple Items API
4-
version: "1.0.0"
5-
description: A simple API to manage items.
3+
title: Large API Specification
4+
description: A comprehensive API specification for testing wrapper generation.
5+
version: 1.0.0
66
servers:
77
- url: https://api.example.com/v1
8+
89
paths:
9-
/items:
10+
/users:
1011
get:
11-
summary: Retrieve a list of items.
12+
summary: Get all users
13+
operationId: getAllUsers
1214
responses:
1315
'200':
14-
description: A JSON array of items.
16+
description: A list of users
1517
content:
1618
application/json:
1719
schema:
1820
type: array
1921
items:
20-
$ref: '#/components/schemas/Item'
22+
$ref: '#/components/schemas/User'
2123
post:
22-
summary: Create a new item.
24+
summary: Create a new user
25+
operationId: createUser
2326
requestBody:
2427
required: true
2528
content:
2629
application/json:
2730
schema:
28-
$ref: '#/components/schemas/Item'
31+
$ref: '#/components/schemas/User'
2932
responses:
3033
'201':
31-
description: Item created successfully.
32-
/items/{itemId}:
34+
description: User created successfully
35+
36+
/users/{userId}:
3337
get:
34-
summary: Retrieve a specific item by ID.
38+
summary: Get user by ID
39+
operationId: getUserById
3540
parameters:
36-
- in: path
37-
name: itemId
41+
- name: userId
42+
in: path
3843
required: true
3944
schema:
4045
type: string
4146
responses:
4247
'200':
43-
description: A single item.
48+
description: User details
4449
content:
4550
application/json:
4651
schema:
47-
$ref: '#/components/schemas/Item'
52+
$ref: '#/components/schemas/User'
53+
put:
54+
summary: Update user
55+
operationId: updateUser
56+
parameters:
57+
- name: userId
58+
in: path
59+
required: true
60+
schema:
61+
type: string
62+
requestBody:
63+
required: true
64+
content:
65+
application/json:
66+
schema:
67+
$ref: '#/components/schemas/User'
68+
responses:
69+
'200':
70+
description: User updated successfully
71+
delete:
72+
summary: Delete user
73+
operationId: deleteUser
74+
parameters:
75+
- name: userId
76+
in: path
77+
required: true
78+
schema:
79+
type: string
80+
responses:
81+
'204':
82+
description: User deleted successfully
83+
84+
/auth/login:
85+
post:
86+
summary: User login
87+
operationId: loginUser
88+
requestBody:
89+
required: true
90+
content:
91+
application/json:
92+
schema:
93+
$ref: '#/components/schemas/LoginRequest'
94+
responses:
95+
'200':
96+
description: Successful login
97+
content:
98+
application/json:
99+
schema:
100+
$ref: '#/components/schemas/AuthResponse'
101+
102+
/products:
103+
get:
104+
summary: Get all products
105+
operationId: getAllProducts
106+
responses:
107+
'200':
108+
description: List of products
109+
content:
110+
application/json:
111+
schema:
112+
type: array
113+
items:
114+
$ref: '#/components/schemas/Product'
115+
116+
/orders:
117+
post:
118+
summary: Create an order
119+
operationId: createOrder
120+
requestBody:
121+
required: true
122+
content:
123+
application/json:
124+
schema:
125+
$ref: '#/components/schemas/Order'
126+
responses:
127+
'201':
128+
description: Order created
129+
130+
/payments:
131+
post:
132+
summary: Process a payment
133+
operationId: processPayment
134+
requestBody:
135+
required: true
136+
content:
137+
application/json:
138+
schema:
139+
$ref: '#/components/schemas/Payment'
140+
responses:
141+
'200':
142+
description: Payment processed
143+
48144
components:
49145
schemas:
50-
Item:
146+
User:
147+
type: object
148+
properties:
149+
id:
150+
type: string
151+
name:
152+
type: string
153+
email:
154+
type: string
155+
156+
LoginRequest:
157+
type: object
158+
properties:
159+
email:
160+
type: string
161+
password:
162+
type: string
163+
164+
AuthResponse:
165+
type: object
166+
properties:
167+
token:
168+
type: string
169+
170+
Product:
51171
type: object
52172
properties:
53173
id:
@@ -56,3 +176,25 @@ components:
56176
type: string
57177
price:
58178
type: number
179+
180+
Order:
181+
type: object
182+
properties:
183+
id:
184+
type: string
185+
userId:
186+
type: string
187+
productId:
188+
type: string
189+
quantity:
190+
type: integer
191+
192+
Payment:
193+
type: object
194+
properties:
195+
id:
196+
type: string
197+
orderId:
198+
type: string
199+
amount:
200+
type: number

0 commit comments

Comments
 (0)