-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
341 additions
and
51 deletions.
There are no files selected for viewing
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
147 changes: 147 additions & 0 deletions
147
src/services/__tests__/openapi/OpenAPI_Auth_API_Key.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
{ | ||
"components": { | ||
"schemas": { | ||
"Vendor": { | ||
"type": "string", | ||
"enum": ["visa", "master-card", "diners-club", "american-express", "discover", "jcb"] | ||
}, | ||
"GetRandomCardNumberResponse": { | ||
"type": "object", | ||
"properties": { | ||
"vendors": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/Vendor" | ||
} | ||
} | ||
} | ||
}, | ||
"GetVendorsResponse": { | ||
"type": "object", | ||
"properties": { | ||
"number": { | ||
"type": "string" | ||
}, | ||
"vendor": { | ||
"type": "string", | ||
"items": { | ||
"$ref": "#/components/schemas/Vendor" | ||
} | ||
} | ||
} | ||
}, | ||
"ErrorResponse": { | ||
"type": "object", | ||
"properties": { | ||
"message": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"securitySchemes": { | ||
"apiKeyAuth": { | ||
"type": "apiKey", | ||
"in": "header", | ||
"name": "X-OpenAPIHub-Key" | ||
} | ||
} | ||
}, | ||
"info": { | ||
"title": "Trial API Credit Card Number Generator", | ||
"description": "# Introduction\nThis is Trial API Credit Card Number Generator", | ||
"version": "1.0.2" | ||
}, | ||
"openapi": "3.0.0", | ||
"paths": { | ||
"/random_card_number": { | ||
"get": { | ||
"operationId": "getRandomCardNumber", | ||
"tags": ["Credit Card Number Generator"], | ||
"summary": "It is API to generate random credit card numbers", | ||
"description": "Generate random credit card numbers", | ||
"parameters": [ | ||
{ | ||
"name": "vendor", | ||
"in": "query", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/components/schemas/Vendor" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successful response", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/GetRandomCardNumberResponse" | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "Bad request", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/ErrorResponse" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"apiKeyAuth": [] | ||
} | ||
] | ||
} | ||
}, | ||
"/vendors": { | ||
"get": { | ||
"operationId": "getSupportedVendors", | ||
"tags": ["Credit Card Number Generator"], | ||
"summary": "It is API to get list of supported vendors", | ||
"description": "Return list of supported vendors", | ||
"responses": { | ||
"200": { | ||
"description": "Successful response", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/GetVendorsResponse" | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "Bad request", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/ErrorResponse" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"apiKeyAuth": [] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "https://trial-api-credit-card-number-generator-2m83.gw.openapihub.com" | ||
}, | ||
{ | ||
"url": "https://5953f2e3-b62c-40cf-bd13-6ffa26e0dd4b-2m83.gw.openapihub.com" | ||
} | ||
], | ||
"tags": [] | ||
} |
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
Oops, something went wrong.