-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: clean schema-form to make them compatible with gio-form-json-sch…
…ema component
- Loading branch information
Showing
3 changed files
with
165 additions
and
183 deletions.
There are no files selected for viewing
116 changes: 55 additions & 61 deletions
116
gravitee-policy-quota/src/main/resources/schemas/schema-form.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 |
---|---|---|
@@ -1,66 +1,60 @@ | ||
{ | ||
"type" : "object", | ||
"id" : "urn:jsonschema:io:gravitee:policy:quota:configuration:QuotaPolicyConfiguration", | ||
"properties" : { | ||
"async": { | ||
"type": "boolean", | ||
"default": false, | ||
"title": "Non-strict mode (async)", | ||
"description": "By activating this option, quota is applied in an asynchronous way meaning that the distributed counter value is not strict." | ||
}, | ||
"addHeaders": { | ||
"type": "boolean", | ||
"default": true, | ||
"title": "Add response headers", | ||
"description": "Add X-Quota-Limit, X-Quota-Remaining and X-Quota-Reset headers in HTTP response" | ||
}, | ||
"quota" : { | ||
"type" : "object", | ||
"title": "Apply quota", | ||
"id" : "urn:jsonschema:io:gravitee:policy:quota:configuration:QuotaConfiguration", | ||
"properties" : { | ||
"key": { | ||
"type": "string", | ||
"default": "", | ||
"title": "Key", | ||
"description": "Key to identify a consumer against whom the quota will be applied. Leave it empty to use the default behavior (plan/subscription pair). Supports EL.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
}, | ||
"limit" : { | ||
"type" : "integer", | ||
"title": "Max requests (static)", | ||
"description": "Static limit on the number of requests that can be sent (this limit is used if the value > 0).", | ||
"minimum": 0 | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"properties": { | ||
"async": { | ||
"type": "boolean", | ||
"default": false, | ||
"title": "Non-strict mode (async)", | ||
"description": "By activating this option, quota is applied in an asynchronous way meaning that the distributed counter value is not strict." | ||
}, | ||
"dynamicLimit" : { | ||
"type" : "string", | ||
"title": "Max requests (dynamic)", | ||
"description": "Dynamic limit on the number of requests that can be sent (this limit is used if static limit = 0). The dynamic value is based on EL expressions.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
"addHeaders": { | ||
"type": "boolean", | ||
"default": true, | ||
"title": "Add response headers", | ||
"description": "Add X-Quota-Limit, X-Quota-Remaining and X-Quota-Reset headers in HTTP response" | ||
}, | ||
"periodTime" : { | ||
"type" : "integer", | ||
"title": "Time duration", | ||
"default": 1 | ||
}, | ||
"periodTimeUnit" : { | ||
"type" : "string", | ||
"title": "Time unit", | ||
"default": "MONTHS", | ||
"enum" : [ "HOURS", "DAYS", "WEEKS", "MONTHS" ] | ||
"quota": { | ||
"type": "object", | ||
"title": "Apply quota", | ||
"properties": { | ||
"key": { | ||
"type": "string", | ||
"default": "", | ||
"title": "Key", | ||
"description": "Key to identify a consumer against whom the quota will be applied. Leave it empty to use the default behavior (plan/subscription pair). Supports EL.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
}, | ||
"limit": { | ||
"type": "integer", | ||
"title": "Max requests (static)", | ||
"description": "Static limit on the number of requests that can be sent (this limit is used if the value > 0).", | ||
"minimum": 0 | ||
}, | ||
"dynamicLimit": { | ||
"type": "string", | ||
"title": "Max requests (dynamic)", | ||
"description": "Dynamic limit on the number of requests that can be sent (this limit is used if static limit = 0). The dynamic value is based on EL expressions.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
}, | ||
"periodTime": { | ||
"type": "integer", | ||
"title": "Time duration", | ||
"default": 1 | ||
}, | ||
"periodTimeUnit": { | ||
"type": "string", | ||
"title": "Time unit", | ||
"default": "MONTHS", | ||
"enum": ["HOURS", "DAYS", "WEEKS", "MONTHS"] | ||
} | ||
}, | ||
"required": ["periodTime", "periodTimeUnit"] | ||
} | ||
}, | ||
"required": [ | ||
"periodTime", | ||
"periodTimeUnit" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"quota" | ||
] | ||
}, | ||
"required": ["quota"] | ||
} |
116 changes: 55 additions & 61 deletions
116
gravitee-policy-ratelimit/src/main/resources/schemas/schema-form.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 |
---|---|---|
@@ -1,66 +1,60 @@ | ||
{ | ||
"type" : "object", | ||
"id" : "urn:jsonschema:io:gravitee:policy:ratelimit:configuration:RateLimitPolicyConfiguration", | ||
"properties" : { | ||
"async": { | ||
"type": "boolean", | ||
"default": false, | ||
"title": "Non-strict mode (async)", | ||
"description": "By activating this option, rate-limiting is applied in an asynchronous way meaning that the distributed counter value is not strict." | ||
}, | ||
"addHeaders": { | ||
"type": "boolean", | ||
"default": false, | ||
"title": "Add response headers", | ||
"description": "Add X-Rate-Limit-Limit, X-Rate-Limit-Remaining and X-Rate-Limit-Reset headers in HTTP response" | ||
}, | ||
"rate" : { | ||
"type" : "object", | ||
"title": "Apply rate-limiting", | ||
"id" : "urn:jsonschema:io:gravitee:policy:ratelimit:configuration:RateLimitConfiguration", | ||
"properties" : { | ||
"key": { | ||
"type": "string", | ||
"default": "", | ||
"title": "Key", | ||
"description": "Key to identify a consumer against whom the rate-limiting will be applied. Leave it empty to use the default behavior (plan/subscription pair). Supports EL.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
}, | ||
"limit" : { | ||
"type" : "integer", | ||
"title": "Max requests (static)", | ||
"description": "Static limit on the number of requests that can be sent (this limit is used if the value > 0).", | ||
"minimum": 0 | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"properties": { | ||
"async": { | ||
"type": "boolean", | ||
"default": false, | ||
"title": "Non-strict mode (async)", | ||
"description": "By activating this option, rate-limiting is applied in an asynchronous way meaning that the distributed counter value is not strict." | ||
}, | ||
"dynamicLimit" : { | ||
"type" : "string", | ||
"title": "Max requests (dynamic)", | ||
"description": "Dynamic limit on the number of requests that can be sent (this limit is used if static limit = 0). The dynamic value is based on EL expressions.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
"addHeaders": { | ||
"type": "boolean", | ||
"default": false, | ||
"title": "Add response headers", | ||
"description": "Add X-Rate-Limit-Limit, X-Rate-Limit-Remaining and X-Rate-Limit-Reset headers in HTTP response" | ||
}, | ||
"periodTime" : { | ||
"type" : "integer", | ||
"title": "Time duration", | ||
"default": 1 | ||
}, | ||
"periodTimeUnit" : { | ||
"type" : "string", | ||
"title": "Time unit", | ||
"default": "SECONDS", | ||
"enum" : [ "SECONDS", "MINUTES" ] | ||
"rate": { | ||
"type": "object", | ||
"title": "Apply rate-limiting", | ||
"properties": { | ||
"key": { | ||
"type": "string", | ||
"default": "", | ||
"title": "Key", | ||
"description": "Key to identify a consumer against whom the rate-limiting will be applied. Leave it empty to use the default behavior (plan/subscription pair). Supports EL.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
}, | ||
"limit": { | ||
"type": "integer", | ||
"title": "Max requests (static)", | ||
"description": "Static limit on the number of requests that can be sent (this limit is used if the value > 0).", | ||
"minimum": 0 | ||
}, | ||
"dynamicLimit": { | ||
"type": "string", | ||
"title": "Max requests (dynamic)", | ||
"description": "Dynamic limit on the number of requests that can be sent (this limit is used if static limit = 0). The dynamic value is based on EL expressions.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
}, | ||
"periodTime": { | ||
"type": "integer", | ||
"title": "Time duration", | ||
"default": 1 | ||
}, | ||
"periodTimeUnit": { | ||
"type": "string", | ||
"title": "Time unit", | ||
"default": "SECONDS", | ||
"enum": ["SECONDS", "MINUTES"] | ||
} | ||
}, | ||
"required": ["periodTime", "periodTimeUnit"] | ||
} | ||
}, | ||
"required": [ | ||
"periodTime", | ||
"periodTimeUnit" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"rate" | ||
] | ||
}, | ||
"required": ["rate"] | ||
} |
116 changes: 55 additions & 61 deletions
116
gravitee-policy-spikearrest/src/main/resources/schemas/schema-form.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 |
---|---|---|
@@ -1,66 +1,60 @@ | ||
{ | ||
"type" : "object", | ||
"id" : "urn:jsonschema:io:gravitee:policy:spike:configuration:SpikeArrestPolicyConfiguration", | ||
"properties" : { | ||
"async": { | ||
"type": "boolean", | ||
"default": false, | ||
"title": "Non-strict mode (async)", | ||
"description": "By activating this option, spike limit is applied in an asynchronous way meaning that the distributed counter value is not strict." | ||
}, | ||
"addHeaders": { | ||
"type": "boolean", | ||
"default": false, | ||
"title": "Add response headers", | ||
"description": "Add X-Spike-Arrest-Limit, X-Spike-Arrest-Remaining and X-Spike-Arrest-Reset headers in HTTP response" | ||
}, | ||
"spike" : { | ||
"type" : "object", | ||
"title": "Apply spike limit", | ||
"id" : "urn:jsonschema:io:gravitee:policy:spike:configuration:SpikeArrestConfiguration", | ||
"properties" : { | ||
"key": { | ||
"type": "string", | ||
"default": "", | ||
"title": "Key", | ||
"description": "Key to identify a consumer against whom the quota will be applied. Leave it empty to use the default behavior. Supports EL.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
}, | ||
"limit" : { | ||
"type" : "integer", | ||
"title": "Max requests (static)", | ||
"description": "Static limit on the number of requests that can be sent (this limit is used if the value > 0).", | ||
"minimum": 0 | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"properties": { | ||
"async": { | ||
"type": "boolean", | ||
"default": false, | ||
"title": "Non-strict mode (async)", | ||
"description": "By activating this option, spike limit is applied in an asynchronous way meaning that the distributed counter value is not strict." | ||
}, | ||
"dynamicLimit" : { | ||
"type" : "string", | ||
"title": "Max requests (dynamic)", | ||
"description": "Dynamic limit on the number of requests that can be sent (this limit is used if static limit = 0). The dynamic value is based on EL expressions.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
"addHeaders": { | ||
"type": "boolean", | ||
"default": false, | ||
"title": "Add response headers", | ||
"description": "Add X-Spike-Arrest-Limit, X-Spike-Arrest-Remaining and X-Spike-Arrest-Reset headers in HTTP response" | ||
}, | ||
"periodTime" : { | ||
"type" : "integer", | ||
"title": "Time duration", | ||
"default": 1 | ||
}, | ||
"periodTimeUnit" : { | ||
"type" : "string", | ||
"title": "Time unit", | ||
"default": "SECONDS", | ||
"enum" : [ "SECONDS", "MINUTES" ] | ||
"spike": { | ||
"type": "object", | ||
"title": "Apply spike limit", | ||
"properties": { | ||
"key": { | ||
"type": "string", | ||
"default": "", | ||
"title": "Key", | ||
"description": "Key to identify a consumer against whom the quota will be applied. Leave it empty to use the default behavior. Supports EL.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
}, | ||
"limit": { | ||
"type": "integer", | ||
"title": "Max requests (static)", | ||
"description": "Static limit on the number of requests that can be sent (this limit is used if the value > 0).", | ||
"minimum": 0 | ||
}, | ||
"dynamicLimit": { | ||
"type": "string", | ||
"title": "Max requests (dynamic)", | ||
"description": "Dynamic limit on the number of requests that can be sent (this limit is used if static limit = 0). The dynamic value is based on EL expressions.", | ||
"x-schema-form": { | ||
"expression-language": true | ||
} | ||
}, | ||
"periodTime": { | ||
"type": "integer", | ||
"title": "Time duration", | ||
"default": 1 | ||
}, | ||
"periodTimeUnit": { | ||
"type": "string", | ||
"title": "Time unit", | ||
"default": "SECONDS", | ||
"enum": ["SECONDS", "MINUTES"] | ||
} | ||
}, | ||
"required": ["periodTime", "periodTimeUnit"] | ||
} | ||
}, | ||
"required": [ | ||
"periodTime", | ||
"periodTimeUnit" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"spike" | ||
] | ||
}, | ||
"required": ["spike"] | ||
} |