Skip to content

Commit

Permalink
Merge pull request #633 from 3scale/policy-summaries
Browse files Browse the repository at this point in the history
Add summary to policy manifests
  • Loading branch information
davidor authored Feb 28, 2018
2 parents c9df38c + 58d88d8 commit c4ee5a6
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## Added

- New property `summary` in the policy manifests [PR #633](https://github.com/3scale/apicast/pull/633)

## Fixed

- Error loading policy chain configuration JSON with null value [PR #626](https://github.com/3scale/apicast/pull/626)
Expand Down
8 changes: 6 additions & 2 deletions gateway/src/apicast/policy/apicast/apicast-policy.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
"name": "APIcast policy",
"description": "Main functionality of APIcast.",
"name": "APIcast",
"summary": "Main functionality of APIcast to work with the 3scale API manager.",
"description":
["Main functionality of APIcast to work with the 3scale API ",
"manager. This includes matching of mapping rules, authorization, ",
"reporting, etc."],
"version": "builtin",
"configuration": {
"type": "object",
Expand Down
3 changes: 2 additions & 1 deletion gateway/src/apicast/policy/caching/apicast-policy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
"name": "Caching policy",
"name": "Caching",
"summary": "Controls how to cache authorizations returned by the 3scale backend.",
"description":
["Configures a cache for the authentication calls against the 3scale ",
"backend. This policy support three kinds of caching: \n",
Expand Down
8 changes: 6 additions & 2 deletions gateway/src/apicast/policy/cors/apicast-policy.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
"name": "CORS policy",
"description": "This policy enables CORS (Cross Origin Resource Sharing) request handling.",
"name": "CORS",
"summary": "Enables CORS (Cross Origin Resource Sharing) request handling.",
"description":
["This policy enables CORS (Cross Origin Resource Sharing) request ",
"handling. It allows to define CORS headers such as ",
"Access-Control-Allow-Headers, Access-Control-Allow-Methods, etc."],
"version": "builtin",
"configuration": {
"type": "object",
Expand Down
3 changes: 2 additions & 1 deletion gateway/src/apicast/policy/echo/apicast-policy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
"name": "Echo policy",
"name": "Echo",
"summary": "Prints the request back to the client and optionally sets a status code.",
"description":
["This policy prints the request back to the client and optionally sets ",
"a status code."],
Expand Down
3 changes: 2 additions & 1 deletion gateway/src/apicast/policy/headers/apicast-policy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
"name": "Headers policy",
"name": "Headers",
"summary": "Allows to include custom headers.",
"description":
["This policy allows to include custom headers that will be sent to the ",
"upstream as well as modify or delete the ones included in the original ",
Expand Down
10 changes: 10 additions & 0 deletions gateway/src/apicast/policy/manifest-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
],
"minLength": 1
},
"summary": {
"$id": "/properties/summary",
"type": "string",
"title": "The Policy Summary",
"description": "Short description of what the policy does",
"examples": [
"Enables CORS (Cross Origin Resource Sharing) request handling."
],
"maxLength": 75
},
"description": {
"$id": "/properties/description",
"oneOf": [
Expand Down
3 changes: 2 additions & 1 deletion gateway/src/apicast/policy/soap/apicast-policy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
"name": "SOAP policy",
"name": "SOAP",
"summary": "Adds support for a small subset of SOAP.",
"description":
["This policy adds support for a very small subset of SOAP. \n",
"It expects a SOAP action URI in the SOAPAction header or the Content-Type ",
Expand Down
8 changes: 6 additions & 2 deletions gateway/src/apicast/policy/upstream/apicast-policy.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
"name": "Upstream policy",
"description": "This policy allows to modify the host of a request based on its path.",
"name": "Upstream",
"summary": "Allows to modify the host of a request based on its path.",
"description":
["This policy allows to modify the host of a request based on its path. ",
"It accepts regular expressions that, when matched against the path, ",
"replace it with a given string."],
"version": "builtin",
"configuration": {
"type": "object",
Expand Down
3 changes: 2 additions & 1 deletion gateway/src/apicast/policy/url_rewriting/apicast-policy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
"name": "URL rewriting policy",
"name": "URL rewriting",
"summary": "Allows to modify the path of a request.",
"description":
["This policy allows to modify the path of a request. ",
"The operations supported are sub and gsub based on ngx.re.sub and ",
Expand Down

0 comments on commit c4ee5a6

Please sign in to comment.