Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avinash793/oas-file-and-swagger-tutorial
Tutorial/Assignment on how to write OAS File using Swagger Editor, generate REST API documentation automatically using Swagger UI, generate client and server side code automatically using swagger CodeGen in different programming languages.
https://github.com/avinash793/oas-file-and-swagger-tutorial
oas rest-api swagger swagger-api swagger-codegen swagger-ui yaml
Last synced: 24 days ago
JSON representation
Tutorial/Assignment on how to write OAS File using Swagger Editor, generate REST API documentation automatically using Swagger UI, generate client and server side code automatically using swagger CodeGen in different programming languages.
- Host: GitHub
- URL: https://github.com/avinash793/oas-file-and-swagger-tutorial
- Owner: Avinash793
- License: gpl-3.0
- Created: 2019-11-16T09:02:29.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-16T10:54:43.000Z (almost 5 years ago)
- Last Synced: 2024-10-14T05:03:36.469Z (24 days ago)
- Topics: oas, rest-api, swagger, swagger-api, swagger-codegen, swagger-ui, yaml
- Homepage:
- Size: 4.55 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OAS-file-and-Swagger-Tutorial
Prerequisite:
1. Knowledge of REST API.
2. Knowledge of OAS file and its components (info, host, basepath, produces, consumes, paths, method (post,get,delete,put), parameters, schemas, defintions, securitydefinitions, request body, response body, etc).Swagger: https://swagger.io/
Create your account and use outstanding features of swagger.
Assignment based on:
1. how to write OAS file using Swagger Editor
2. generate interactive API documentation automatically using Swagger UI
3. use OAS file to generate client/server side code automatically using Swagger CodeGen in different programming languages.Swagger is tool to create and use REST API defintions. You write Open API Specification (OAS) file using [swagger editor](http://editor.swagger.io/) in which you define your REST API definitions (info, host, basepath, produces, consumes, paths, method (post,get,delete,put), parameters, schemas, defintions, securitydefinitions, etc). Then you use swagger tool for various purposes:
1. Swagger UI - for automatically generate interactive api documentation (really awesome)
2. Swagger CodeGen - for automatically generate client/server side code in different programming languages. (very cool features)
3. Swagger Hub - to store and manage your OAS files and API definitions.
4. Swagger Editor - to create OAS files (either in yaml or json).
This Tutorial contains two assignments to create OAS file using swagger editor and use swagger tool for various purposes.
1. Music API Assignment: Follow exercises 2,3,4,5 and 6. It will give you good understanding of OAS file and Swagger. It contains "MusicAPI.yaml" file that is final OAS file after you follow all the exercises. It also have folder "Swagger-client-code-generated" which contain automatically generated client code in different programming languages (GO/JAVA/JAVASCRIPT).
For API Documentation, you can see it will generate on right side of your swagger editor.
You can see Swagger UI same as image attached below:
![alt text](https://github.com/AVINASH793/OAS-file-and-Swagger-Tutorial/blob/master/SwaggerUI_Images/SwaggerUI_MUSICAPI.png "Logo Title Text 1")2. Stripe Assignment: This contain assignment with step to step guide to make OAS file (with real REST API) and use swagger tool for various purposes as mentioned above. It also have folder "Swagger-client-code-generated" which contain automatically generated client code in different programming languages (GO/PYTHON) and "Swagger-server-code-generated" which contain automatically generated sever code in different programming languages (GO).
For API Documentation, you can see it will generate on right side of your swagger editor.
You can see Swagger UI same as image attached below:
![alt text](https://github.com/AVINASH793/OAS-file-and-Swagger-Tutorial/blob/master/SwaggerUI_Images/SwaggerUI_StripeAPI.png "Logo Title Text 1")