Skip to content

Commit

Permalink
Add swagger for Spring Cloud Gateway response cache (#25924)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiec-msft authored Oct 11, 2023
1 parent fd3b751 commit b5d9b53
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13923,6 +13923,11 @@
"operatorProperties": {
"$ref": "#/definitions/GatewayOperatorProperties",
"readOnly": true
},
"responseCacheProperties": {
"$ref": "#/definitions/GatewayResponseCacheProperties",
"description": "The properties to configure different types of response cache for Spring Cloud Gateway.",
"x-ms-client-flatten": false
}
}
},
Expand Down Expand Up @@ -14321,6 +14326,70 @@
}
}
},
"GatewayResponseCacheProperties": {
"description": "Spring Cloud Gateway response cache properties.",
"required": [
"responseCacheType"
],
"type": "object",
"properties": {
"responseCacheType": {
"description": "The type of the response cache.",
"type": "string",
"x-ms-mutability": [
"create",
"read"
]
}
},
"discriminator": "responseCacheType"
},
"GatewayLocalResponseCachePerRouteProperties": {
"description": "Spring Cloud Gateway local response cache per route properties.",
"required": [
"responseCacheType"
],
"type": "object",
"allOf": [
{
"$ref": "#/definitions/GatewayResponseCacheProperties"
}
],
"properties": {
"size": {
"description": "Maximum size of cache (10MB, 900KB, 1GB...) to determine if the cache needs to evict some entries.",
"type": "string"
},
"timeToLive": {
"description": "Time before a cached entry is expired (300s, 5m, 1h...)",
"type": "string"
}
},
"x-ms-discriminator-value": "LocalCachePerRoute"
},
"GatewayLocalResponseCachePerInstanceProperties": {
"description": "Spring Cloud Gateway local response cache per instance properties.",
"required": [
"responseCacheType"
],
"type": "object",
"allOf": [
{
"$ref": "#/definitions/GatewayResponseCacheProperties"
}
],
"properties": {
"size": {
"description": "Maximum size of cache (10MB, 900KB, 1GB...) to determine if the cache needs to evict some entries",
"type": "string"
},
"timeToLive": {
"description": "Time before a cached entry is expired (300s, 5m, 1h...)",
"type": "string"
}
},
"x-ms-discriminator-value": "LocalCachePerInstance"
},
"ApiPortalResourceCollection": {
"description": "Object that includes an array of API portal resources and a possible link for next set",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
"resourceRequests": {
"cpu": "1",
"memory": "1G"
},
"responseCacheProperties": {
"responseCacheType": "LocalCachePerRoute",
"size": "5MB",
"timeToLive": "300s"
}
},
"sku": {
Expand All @@ -41,6 +46,11 @@
"cpu": "1",
"memory": "1G"
},
"responseCacheProperties": {
"responseCacheType": "LocalCachePerRoute",
"size": "5MB",
"timeToLive": "300s"
},
"instances": [
{
"name": "instance1",
Expand Down Expand Up @@ -102,6 +112,11 @@
"cpu": "1",
"memory": "1G"
},
"responseCacheProperties": {
"responseCacheType": "LocalCachePerRoute",
"size": "5MB",
"timeToLive": "300s"
},
"instances": [
{
"name": "instance1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"cpu": "1",
"memory": "1G"
},
"responseCacheProperties": {
"responseCacheType": "LocalCachePerRoute",
"size": "5MB",
"timeToLive": "300s"
},
"instances": [
{
"name": "instance1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
"cpu": "1",
"memory": "1G"
},
"responseCacheProperties": {
"responseCacheType": "LocalCachePerRoute",
"size": "5MB",
"timeToLive": "300s"
},
"instances": [
{
"name": "instance1",
Expand Down

0 comments on commit b5d9b53

Please sign in to comment.