@@ -330,18 +330,21 @@ Here is what it looks like:
330
330
### Using the ` openapi.yaml ` File
331
331
332
332
1 . ** View the API Documentation**
333
+
333
334
- Open [ Swagger Editor] ( https://editor.swagger.io/ ) .
334
335
- Upload the ` openapi.yaml ` file or paste its content.
335
336
- Visualize and interact with the API documentation.
336
337
337
338
2 . ** Test the API**
339
+
338
340
- Import ` openapi.yaml ` into [ Postman] ( https://www.postman.com/ ) :
339
341
- Open Postman → Import → Select ` openapi.yaml ` .
340
342
- Test the API endpoints directly from Postman.
341
343
- Or use [ Swagger UI] ( https://swagger.io/tools/swagger-ui/ ) :
342
344
- Provide the file URL or upload it to view and test endpoints.
343
345
344
346
3 . ** Generate Client Libraries**
347
+
345
348
- Install OpenAPI Generator:
346
349
``` bash
347
350
npm install @openapitools/openapi-generator-cli -g
@@ -353,13 +356,15 @@ Here is what it looks like:
353
356
- Replace ` <language> ` with the desired programming language.
354
357
355
358
4 . ** Generate Server Stubs**
359
+
356
360
- Generate a server stub:
357
361
``` bash
358
362
openapi-generator-cli generate -i openapi.yaml -g < framework> -o ./server
359
363
```
360
364
- Replace ` <framework> ` with the desired framework.
361
365
362
366
5 . ** Run a Mock Server**
367
+
363
368
- Install Prism:
364
369
``` bash
365
370
npm install -g @stoplight/prism-cli
@@ -370,6 +375,7 @@ Here is what it looks like:
370
375
```
371
376
372
377
6 . ** Validate the OpenAPI File**
378
+
373
379
- Use [ Swagger Validator] ( https://validator.swagger.io/ ) :
374
380
- Upload ` openapi.yaml ` or paste its content to check for errors.
375
381
0 commit comments