Skip to content

Commit c4ee5a6

Browse files
authored
Merge pull request #633 from 3scale/policy-summaries
Add summary to policy manifests
2 parents c9df38c + 58d88d8 commit c4ee5a6

File tree

10 files changed

+42
-11
lines changed

10 files changed

+42
-11
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
88

9+
## Added
10+
11+
- New property `summary` in the policy manifests [PR #633](https://github.com/3scale/apicast/pull/633)
12+
913
## Fixed
1014

1115
- Error loading policy chain configuration JSON with null value [PR #626](https://github.com/3scale/apicast/pull/626)

gateway/src/apicast/policy/apicast/apicast-policy.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
3-
"name": "APIcast policy",
4-
"description": "Main functionality of APIcast.",
3+
"name": "APIcast",
4+
"summary": "Main functionality of APIcast to work with the 3scale API manager.",
5+
"description":
6+
["Main functionality of APIcast to work with the 3scale API ",
7+
"manager. This includes matching of mapping rules, authorization, ",
8+
"reporting, etc."],
59
"version": "builtin",
610
"configuration": {
711
"type": "object",

gateway/src/apicast/policy/caching/apicast-policy.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
3-
"name": "Caching policy",
3+
"name": "Caching",
4+
"summary": "Controls how to cache authorizations returned by the 3scale backend.",
45
"description":
56
["Configures a cache for the authentication calls against the 3scale ",
67
"backend. This policy support three kinds of caching: \n",

gateway/src/apicast/policy/cors/apicast-policy.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
3-
"name": "CORS policy",
4-
"description": "This policy enables CORS (Cross Origin Resource Sharing) request handling.",
3+
"name": "CORS",
4+
"summary": "Enables CORS (Cross Origin Resource Sharing) request handling.",
5+
"description":
6+
["This policy enables CORS (Cross Origin Resource Sharing) request ",
7+
"handling. It allows to define CORS headers such as ",
8+
"Access-Control-Allow-Headers, Access-Control-Allow-Methods, etc."],
59
"version": "builtin",
610
"configuration": {
711
"type": "object",

gateway/src/apicast/policy/echo/apicast-policy.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
3-
"name": "Echo policy",
3+
"name": "Echo",
4+
"summary": "Prints the request back to the client and optionally sets a status code.",
45
"description":
56
["This policy prints the request back to the client and optionally sets ",
67
"a status code."],

gateway/src/apicast/policy/headers/apicast-policy.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
3-
"name": "Headers policy",
3+
"name": "Headers",
4+
"summary": "Allows to include custom headers.",
45
"description":
56
["This policy allows to include custom headers that will be sent to the ",
67
"upstream as well as modify or delete the ones included in the original ",

gateway/src/apicast/policy/manifest-schema.json

+10
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@
3131
],
3232
"minLength": 1
3333
},
34+
"summary": {
35+
"$id": "/properties/summary",
36+
"type": "string",
37+
"title": "The Policy Summary",
38+
"description": "Short description of what the policy does",
39+
"examples": [
40+
"Enables CORS (Cross Origin Resource Sharing) request handling."
41+
],
42+
"maxLength": 75
43+
},
3444
"description": {
3545
"$id": "/properties/description",
3646
"oneOf": [

gateway/src/apicast/policy/soap/apicast-policy.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
3-
"name": "SOAP policy",
3+
"name": "SOAP",
4+
"summary": "Adds support for a small subset of SOAP.",
45
"description":
56
["This policy adds support for a very small subset of SOAP. \n",
67
"It expects a SOAP action URI in the SOAPAction header or the Content-Type ",

gateway/src/apicast/policy/upstream/apicast-policy.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
3-
"name": "Upstream policy",
4-
"description": "This policy allows to modify the host of a request based on its path.",
3+
"name": "Upstream",
4+
"summary": "Allows to modify the host of a request based on its path.",
5+
"description":
6+
["This policy allows to modify the host of a request based on its path. ",
7+
"It accepts regular expressions that, when matched against the path, ",
8+
"replace it with a given string."],
59
"version": "builtin",
610
"configuration": {
711
"type": "object",

gateway/src/apicast/policy/url_rewriting/apicast-policy.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
3-
"name": "URL rewriting policy",
3+
"name": "URL rewriting",
4+
"summary": "Allows to modify the path of a request.",
45
"description":
56
["This policy allows to modify the path of a request. ",
67
"The operations supported are sub and gsub based on ngx.re.sub and ",

0 commit comments

Comments
 (0)