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

Schema for named strains and strains as list #73

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
* [Git URL](./giturl.schema.md) – `https://ns.adobe.com/helix/shared/giturl` (Stabilizing)
* [Git URL](./staticgiturl.schema.md) – `https://ns.adobe.com/helix/shared/staticgiturl` (Stabilizing)
* [Origin](./origin.schema.md) – `https://ns.adobe.com/helix/shared/origin` (Stabilizing)
* [Proxy Strain](./namedproxystrain.schema.md) – `https://ns.adobe.com/helix/shared/namedproxystrain` (Stabilizing)
* [Proxy Strain](./proxystrain.schema.md) – `https://ns.adobe.com/helix/shared/proxystrain` (Stabilizing)
* [Redirect Rule](./redirectrule.schema.md) – `https://ns.adobe.com/helix/shared/redirectrule` (Stabilizing)
* [Runtime Strain](./namedruntimestrain.schema.md) – `https://ns.adobe.com/helix/shared/namedruntimestrain` (Stabilizing)
* [Runtime Strain](./performance.schema.md) – `https://ns.adobe.com/helix/shared/performance` (Stabilizing)
* [Runtime Strain](./runtimestrain.schema.md) – `https://ns.adobe.com/helix/shared/runtimestrain` (Stabilizing)
* [Strains](./strains.schema.md) – `https://ns.adobe.com/helix/shared/strains` (Stabilizing)
Expand Down
80 changes: 80 additions & 0 deletions docs/namedproxystrain.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"meta:license": [
"Copyright 2019 Adobe. All rights reserved.",
"This file is licensed to you under the Apache License, Version 2.0 (the \"License\");",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at http://www.apache.org/licenses/LICENSE-2.0",
"",
"Unless required by applicable law or agreed to in writing, software distributed under",
"the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS",
"OF ANY KIND, either express or implied. See the License for the specific language",
"governing permissions and limitations under the License."
],
"$id": "https://ns.adobe.com/helix/shared/namedproxystrain",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Proxy Strain",
"type": "object",
"meta:status": "stabilizing",
"description": "A strain is a combination of code and content that enables the creation of a digital experience. Strains can be used to create language variants of websites, A/B tests, personalization, or to aggregate content from multiple sources",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Name of the strain"
},
"origin": {
"description": "Origin backend for proxy strains.",
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"$ref": "https://ns.adobe.com/helix/shared/origin"
}
]
},
"sticky": {
"description": "Sticky strains are not re-evaluated on every request. As soon as a visitor is determined to match a sticky strain, a session cookie will be set to keep the user in the strain.",
"type": "boolean"
},
"url": {
"description": "URL condition (note, this will be merged into a more general condition language)",
"type": "string",
"format": "uri"
},
"urls": {
"description": "URL condition (note, this will be merged into a more general condition language)",
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"condition": {
"description": "VLC condition that controls that can optionally activate this strain.",
"type": "string"
},
"perf": {
"$ref": "https://ns.adobe.com/helix/shared/performance"
},
"params": {
"description": "A whitelist (using globbing language) of URL parameters. Note: every parameter is a potential cache killer.",
"type": "array",
"items": {
"type": "string"
}
},
"redirects": {
"type": "array",
"description": "The redirect rules that should be applied to this strain",
"items": {
"$ref": "https://ns.adobe.com/helix/shared/redirectrule"
}
}
},
"required": [
"origin",
"name"
]
}
246 changes: 246 additions & 0 deletions docs/namedproxystrain.schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@

# Proxy Strain Schema

```
https://ns.adobe.com/helix/shared/namedproxystrain
```

A strain is a combination of code and content that enables the creation of a digital experience. Strains can be used to create language variants of websites, A/B tests, personalization, or to aggregate content from multiple sources

| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
|----------|------------|--------|--------------|-------------------|-----------------------|------------|
| Can be instantiated | No | Stabilizing | No | Forbidden | Forbidden | [namedproxystrain.schema.json](namedproxystrain.schema.json) |
## Schema Hierarchy

* Proxy Strain `https://ns.adobe.com/helix/shared/namedproxystrain`
* [Runtime Strain](performance.schema.md) `https://ns.adobe.com/helix/shared/performance`


# Proxy Strain Properties

| Property | Type | Required | Defined by |
|----------|------|----------|------------|
| [condition](#condition) | `string` | Optional | Proxy Strain (this schema) |
| [name](#name) | `string` | **Required** | Proxy Strain (this schema) |
| [origin](#origin) | complex | **Required** | Proxy Strain (this schema) |
| [params](#params) | `string[]` | Optional | Proxy Strain (this schema) |
| [perf](#perf) | Runtime Strain | Optional | Proxy Strain (this schema) |
| [redirects](#redirects) | Redirect Rule | Optional | Proxy Strain (this schema) |
| [sticky](#sticky) | `boolean` | Optional | Proxy Strain (this schema) |
| [url](#url) | `string` | Optional | Proxy Strain (this schema) |
| [urls](#urls) | `string[]` | Optional | Proxy Strain (this schema) |

## condition

VLC condition that controls that can optionally activate this strain.

`condition`

* is optional
* type: `string`
* defined in this schema

### condition Type


`string`







## name

Name of the strain

`name`

* is **required**
* type: `string`
* defined in this schema

### name Type


`string`







## origin

Origin backend for proxy strains.

`origin`

* is **required**
* type: complex
* defined in this schema

### origin Type


**Any** following *options* needs to be fulfilled.


#### Option 1


`string`

* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))



#### Option 2


* []() – `https://ns.adobe.com/helix/shared/origin`






## params

A whitelist (using globbing language) of URL parameters. Note: every parameter is a potential cache killer.

`params`

* is optional
* type: `string[]`
* defined in this schema

### params Type


Array type: `string[]`

All items must be of the type:
`string`










## perf


`perf`

* is optional
* type: Runtime Strain
* defined in this schema

### perf Type


* [Runtime Strain](performance.schema.md) – `https://ns.adobe.com/helix/shared/performance`





## redirects

The redirect rules that should be applied to this strain

`redirects`

* is optional
* type: Redirect Rule
* defined in this schema

### redirects Type


Array type: Redirect Rule

All items must be of the type:
* [Redirect Rule](redirectrule.schema.md) – `https://ns.adobe.com/helix/shared/redirectrule`








## sticky

Sticky strains are not re-evaluated on every request. As soon as a visitor is determined to match a sticky strain, a session cookie will be set to keep the user in the strain.

`sticky`

* is optional
* type: `boolean`
* defined in this schema

### sticky Type


`boolean`





## url

URL condition (note, this will be merged into a more general condition language)

`url`

* is optional
* type: `string`
* defined in this schema

### url Type


`string`

* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))






## urls

URL condition (note, this will be merged into a more general condition language)

`urls`

* is optional
* type: `string[]`
* defined in this schema

### urls Type


Array type: `string[]`

All items must be of the type:
`string`

* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))







Loading