Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more OAS examples #210

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,158 @@
{
"components": {},
"info": {
"title": "httpbin API",
"version": "1.0.0"
},
"openapi": "3.0.0",
"paths": {
"/anything": {
"get": {
"operationId": "anythingGET",
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Return anything"
}
},
"/delay": {
"get": {
"operationId": "delayGET",
"parameters": [
{
"description": "Time to delay in seconds",
"in": "query",
"name": "delay",
"required": true,
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Delay response by a specified time"
}
},
"/get": {
"get": {
"operationId": "getGET",
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Return GET request data"
}
},
"/post": {
"post": {
"operationId": "postPOST",
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Return POST request data"
}
},
"/status/{statusCode}": {
"get": {
"operationId": "status/{statusCode}GET",
"parameters": [
{
"description": "HTTP status code",
"in": "path",
"name": "statusCode",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Return a response with the specified status code"
}
},
"/uuid": {
"get": {
"operationId": "uuidGET",
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Return a UUID"
}
}
},
"servers": [
{
"url": "http://localhost:8181/api-with-cache"
}
],
"x-tyk-api-gateway": {
"info": {
"dbId": "650c2c5286341f0f820173e0",
"id": "274fefb9a9a2468658c4c0895db82fb7",
"name": "API with Cache",
"orgId": "646490d486341f29c665c45c",
"state": {
"active": true
}
},
"middleware": {
"operations": {
"anythingGET": {
"allow": {
"enabled": true
}
},
"delayGET": {
"allow": {
"enabled": true
}
},
"getGET": {
"allow": {
"enabled": true
}
},
"postPOST": {
"allow": {
"enabled": true
}
},
"status/{statusCode}GET": {
"allow": {
"enabled": true
}
},
"uuidGET": {
"allow": {
"enabled": true
}
}
}
},
"server": {
"listenPath": {
"strip": true,
"value": "/api-with-cache"
}
},
"upstream": {
"url": "http://httpbin.org"
}
}
}
@@ -0,0 +1,166 @@
{
"components": {},
"info": {
"title": "httpbin API",
"version": "1.0.0"
},
"openapi": "3.0.0",
"paths": {
"/anything": {
"get": {
"operationId": "anythingGET",
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Return anything"
}
},
"/delay": {
"get": {
"operationId": "delayGET",
"parameters": [
{
"description": "Time to delay in seconds",
"in": "query",
"name": "delay",
"required": true,
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Delay response by a specified time"
}
},
"/get": {
"get": {
"operationId": "getGET",
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Return GET request data"
}
},
"/post": {
"post": {
"operationId": "postPOST",
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Return POST request data"
}
},
"/status/{statusCode}": {
"get": {
"operationId": "status/{statusCode}GET",
"parameters": [
{
"description": "HTTP status code",
"in": "path",
"name": "statusCode",
"required": true,
"schema": {
"format": "int32",
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Return a response with the specified status code"
}
},
"/uuid": {
"get": {
"operationId": "uuidGET",
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Return a UUID"
}
}
},
"servers": [
{
"url": "http://localhost:8181/api-validate-request"
}
],
"x-tyk-api-gateway": {
"info": {
"dbId": "650c2cb686341f0f820173e1",
"id": "2f506d14ad5c40ae6a73d172ae3224f5",
"name": "API with Validate Request",
"orgId": "646490d486341f29c665c45c",
"state": {
"active": true
}
},
"middleware": {
"operations": {
"anythingGET": {
"allow": {
"enabled": true
}
},
"delayGET": {
"allow": {
"enabled": true
},
"validateRequest": {
"enabled": true,
"errorResponseCode": 422
}
},
"getGET": {
"allow": {
"enabled": true
}
},
"postPOST": {
"allow": {
"enabled": true
}
},
"status/{statusCode}GET": {
"allow": {
"enabled": true
},
"validateRequest": {
"enabled": true,
"errorResponseCode": 422
}
},
"uuidGET": {
"allow": {
"enabled": true
}
}
}
},
"server": {
"listenPath": {
"strip": true,
"value": "/api-validate-request"
}
},
"upstream": {
"url": "http://httpbin.org"
}
}
}