Created
July 8, 2023 08:44
-
-
Save bipon68/5ab0e51a21e4c4484c3d75a466c4b694 to your computer and use it in GitHub Desktop.
Basic-open-api-specification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
version: 1.0.0 | |
title: Testing Open Api Spec | |
description: > | |
I am learning Open API Specification. This is industry standard specification technique for any web service | |
termsOfService: https://example.com/terms | |
contact: | |
name: Bipon Biswas | |
url: https://example.com | |
email: [email protected] | |
license: | |
name: Apache 2.0 | |
url: http://apache.com | |
servers: | |
- url: http://localhost:4000/api/v1 | |
description: dev server | |
- url: http://example.com/api/v1 | |
description: prod server | |
paths: | |
/health: | |
get: | |
tags: [Health] | |
description: this endpoint will test the health of the api | |
responses: | |
'200': | |
description: it will return a success message | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
message: | |
type: string | |
example: ok | |
'500': | |
description: The Server is down | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
message: | |
type: string | |
example: server is down | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment