diff --git a/site/documentation/how-do-i-write-policies/index.md b/site/documentation/how-do-i-write-policies/index.md index b7446662e8..3d155b7721 100644 --- a/site/documentation/how-do-i-write-policies/index.md +++ b/site/documentation/how-do-i-write-policies/index.md @@ -105,11 +105,11 @@ undefined We can define rules in terms of [Variables](#variables) as well: ```ruby -t { x = 42, y = 41, x > y } +t { x = 42; y = 41; x > y } ``` -The formal syntax uses the comma character `,` to separate expressions. Rule -bodies can separate expressions with newlines and omit the comma: +The formal syntax uses the semicolon character `;` to separate expressions. Rule +bodies can separate expressions with newlines and omit the semicolon: ``` t2 { @@ -265,7 +265,7 @@ The result: Composite values can also be defined in terms of [Variables](#variables) or [References](#references). For example: ```ruby -> a = 42, b = false, c = null, d = {"a": a, "x": [b, c]} +> a = 42; b = false; c = null; d = {"a": a, "x": [b, c]} +----+-------+------+---------------------------+ | A | B | C | D | +----+-------+------+---------------------------+ @@ -283,7 +283,7 @@ defined in terms of scalars, variables, references, and other composite values. For example: ```ruby -> s = {cube.width, cube.height, cube.depth}, count(s, n) +> s = {cube.width, cube.height, cube.depth}; count(s, n) +---+---------+ | n | s | +---+---------+ diff --git a/site/documentation/how-does-opa-work/index.md b/site/documentation/how-does-opa-work/index.md index 86c9b157bb..dd54b7be53 100644 --- a/site/documentation/how-does-opa-work/index.md +++ b/site/documentation/how-does-opa-work/index.md @@ -231,7 +231,7 @@ import input.method import input.user # allow "bob" to perform read-only operations -allow { user = "bob", method = "GET" } +allow { user = "bob"; method = "GET" } # allow "alice" to perform any operation allow { user = "alice" } @@ -533,9 +533,9 @@ Any rule can be used as the trigger for a notification. For example, let’s ass # All production containers are running if... containers_to_migrate[id] { # ...the container exists - container = containers[id], + container = containers[id] # ...and it is in production - container.site.name = "prod", + container.site.name = "prod" # ...and its host is running. container.host.state != "terminated" } diff --git a/site/documentation/references/rest/index.md b/site/documentation/references/rest/index.md index e5c267f89e..e2c48214ec 100644 --- a/site/documentation/references/rest/index.md +++ b/site/documentation/references/rest/index.md @@ -1616,7 +1616,7 @@ Execute an ad-hoc query and return bindings for variables found in the query. #### Example Request ``` -GET /v1/query?q=data.servers[i].ports[_] = "p2", data.servers[i].name = name HTTP/1.1 +GET /v1/query?q=data.servers[i].ports[_] = "p2"; data.servers[i].name = name HTTP/1.1 ``` #### Example Response diff --git a/site/examples/working-with-the-opa-repl/index.md b/site/examples/working-with-the-opa-repl/index.md index 8e6535c887..6acc12546d 100644 --- a/site/examples/working-with-the-opa-repl/index.md +++ b/site/examples/working-with-the-opa-repl/index.md @@ -99,7 +99,7 @@ false In addition to running queries, the REPL also lets you define rules: ```ruby -> p[x] { a = [1,2,3,4], a[x] } +> p[x] { a = [1,2,3,4]; a[x] } > p[x] > 1 +---+ | x | @@ -236,7 +236,7 @@ The REPL also understands the [Import and Package](/documentation/how-do-i-write ```ruby > import data.servers -> servers[i].ports[_] = "p2", servers[i].id = id +> servers[i].ports[_] = "p2"; servers[i].id = id +---+------+ | i | id | +---+------+