Skip to content

Commit

Permalink
autogen(docs): generate and format documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Aug 19, 2020
1 parent 6c056bb commit 767a875
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 45 deletions.
16 changes: 9 additions & 7 deletions docs/config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
module.exports = {
projectName: 'ORY Keto',
projectSlug: 'keto',
projectTagLine: 'A cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.',
projectTagLine:
'A cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.',
updateTags: [
{
image: 'oryd/keto',
files: ['docs/docs/configure-deploy.md']
},
{
replacer: ({content, next}) => content.replace(/v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/gi, `${next}`),
files: [
'docs/docs/install.md',
]
replacer: ({ content, next }) =>
content.replace(
/v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/gi,
`${next}`
),
files: ['docs/docs/install.md']
}
],
updateConfig: {
src: '.schema/config.schema.json',
dst: './docs/docs/reference/configuration.md'
}
};

}
7 changes: 4 additions & 3 deletions docs/docs/milestones.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ New feature or request

#### Issues

* [x] policy: evaluate wildcard matching strategy ([keto#11](https://github.com/ory/keto/issues/11))
- [x] policy: evaluate wildcard matching strategy
([keto#11](https://github.com/ory/keto/issues/11))

#### Pull Requests

Expand All @@ -37,7 +38,8 @@ Extra attention is needed

#### Issues

* [x] Moving forward with this project's versioning ([keto#56](https://github.com/ory/keto/issues/56))
- [x] Moving forward with this project's versioning
([keto#56](https://github.com/ory/keto/issues/56))

#### Pull Requests

Expand Down Expand Up @@ -96,4 +98,3 @@ This will not be worked on
#### Issues

#### Pull Requests

40 changes: 28 additions & 12 deletions docs/docs/reference/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ is denied, a 403 response with `{"allowed":"false"}` will be sent instead.
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="check-if-a-request-is-allowed-responseschema"></a>

##### Response Schema

Status Code **500**
Expand Down Expand Up @@ -273,6 +274,7 @@ List ORY Access Control Policies
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="listoryaccesscontrolpolicies-responseschema"></a>

##### Response Schema

Status Code **200**
Expand Down Expand Up @@ -492,6 +494,7 @@ Upsert an ORY Access Control Policy
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="upsertoryaccesscontrolpolicy-responseschema"></a>

##### Response Schema

Status Code **500**
Expand Down Expand Up @@ -699,6 +702,7 @@ Get an ORY Access Control Policy
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="getoryaccesscontrolpolicy-responseschema"></a>

##### Response Schema

Status Code **404**
Expand Down Expand Up @@ -898,6 +902,7 @@ Delete an ORY Access Control Policy
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="deleteoryaccesscontrolpolicy-responseschema"></a>

##### Response Schema

Status Code **500**
Expand Down Expand Up @@ -1088,6 +1093,7 @@ Control Policy (OACP) by using the Role ID as subject in the OACP.
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="list-ory-access-control-policy-roles-responseschema"></a>

##### Response Schema

Status Code **200**
Expand Down Expand Up @@ -1295,6 +1301,7 @@ Control Policy (OACP) by using the Role ID as subject in the OACP.
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="upsert-an-ory-access-control-policy-role-responseschema"></a>

##### Response Schema

Status Code **500**
Expand Down Expand Up @@ -1491,6 +1498,7 @@ Control Policy (OACP) by using the Role ID as subject in the OACP.
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="get-an-ory-access-control-policy-role-responseschema"></a>

##### Response Schema

Status Code **404**
Expand Down Expand Up @@ -1687,6 +1695,7 @@ Control Policy (OACP) by using the Role ID as subject in the OACP.
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="delete-an-ory-access-control-policy-role-responseschema"></a>

##### Response Schema

Status Code **500**
Expand Down Expand Up @@ -1885,6 +1894,7 @@ Control Policy (OACP) by using the Role ID as subject in the OACP.
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="add-a-member-to-an-ory-access-control-policy-role-responseschema"></a>

##### Response Schema

Status Code **500**
Expand Down Expand Up @@ -2079,6 +2089,7 @@ Control Policy (OACP) by using the Role ID as subject in the OACP.
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="remove-a-member-from-an-ory-access-control-policy-role-responseschema"></a>

##### Response Schema

Status Code **500**
Expand Down Expand Up @@ -2269,6 +2280,7 @@ status will never refer to the cluster state, only to a single instance.
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | The standard error format | Inline |

<a id="check-alive-status-responseschema"></a>

##### Response Schema

Status Code **500**
Expand Down Expand Up @@ -2755,9 +2767,8 @@ p JSON.parse(result)

## Schemas

<a id="tocSaddoryaccesscontrolpolicyrolemembersbody">
addOryAccessControlPolicyRoleMembersBody
</a>
<a id="tocSaddoryaccesscontrolpolicyrolemembersbody"></a>

#### addOryAccessControlPolicyRoleMembersBody

<a id="schemaaddoryaccesscontrolpolicyrolemembersbody"></a>
Expand All @@ -2774,7 +2785,8 @@ p JSON.parse(result)
| ------- | -------- | -------- | ------------ | ------------------------ |
| members | [string] | false | none | The members to be added. |

<a id="tocSauthorizationresult">authorizationResult</a>
<a id="tocSauthorizationresult"></a>

#### authorizationResult

<a id="schemaauthorizationresult"></a>
Expand All @@ -2794,7 +2806,8 @@ the decision outcome._
| ------- | ------- | -------- | ------------ | --------------------------------------------------------------------- |
| allowed | boolean | true | none | Allowed is true if the request should be allowed and false otherwise. |

<a id="tocShealthnotreadystatus">healthNotReadyStatus</a>
<a id="tocShealthnotreadystatus"></a>

#### healthNotReadyStatus

<a id="schemahealthnotreadystatus"></a>
Expand All @@ -2815,7 +2828,8 @@ the decision outcome._
| errors | object | false | none | Errors contains a list of errors that caused the not ready status. |
| » **additionalProperties** | string | false | none | none |

<a id="tocShealthstatus">healthStatus</a>
<a id="tocShealthstatus"></a>

#### healthStatus

<a id="schemahealthstatus"></a>
Expand All @@ -2832,7 +2846,8 @@ the decision outcome._
| ------ | ------ | -------- | ------------ | ---------------------------- |
| status | string | false | none | Status always contains "ok". |

<a id="tocSoryaccesscontrolpolicy">oryAccessControlPolicy</a>
<a id="tocSoryaccesscontrolpolicy"></a>

#### oryAccessControlPolicy

<a id="schemaoryaccesscontrolpolicy"></a>
Expand Down Expand Up @@ -2863,9 +2878,8 @@ _oryAccessControlPolicy specifies an ORY Access Policy document._
| resources | [string] | false | none | Resources is an array representing all the resources this ORY Access Policy applies to. |
| subjects | [string] | false | none | Subjects is an array representing all the subjects this ORY Access Policy applies to. |

<a id="tocSoryaccesscontrolpolicyallowedinput">
oryAccessControlPolicyAllowedInput
</a>
<a id="tocSoryaccesscontrolpolicyallowedinput"></a>

#### oryAccessControlPolicyAllowedInput

<a id="schemaoryaccesscontrolpolicyallowedinput"></a>
Expand All @@ -2890,7 +2904,8 @@ _Input for checking if a request is allowed or not._
| resource | string | false | none | Resource is the resource that access is requested to. |
| subject | string | false | none | Subject is the subject that is requesting access. |

<a id="tocSoryaccesscontrolpolicyrole">oryAccessControlPolicyRole</a>
<a id="tocSoryaccesscontrolpolicyrole"></a>

#### oryAccessControlPolicyRole

<a id="schemaoryaccesscontrolpolicyrole"></a>
Expand All @@ -2915,7 +2930,8 @@ other sort of role._
| id | string | false | none | ID is the role's unique id. |
| members | [string] | false | none | Members is who belongs to the role. |

<a id="tocSversion">version</a>
<a id="tocSversion"></a>

#### version

<a id="schemaversion"></a>
Expand Down
53 changes: 35 additions & 18 deletions docs/docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ serve:
#
# Default value: 4456
#
# Minimum value: 1
#
# Maximum value: 65535
#
# Examples:
# - 4456
#
Expand Down Expand Up @@ -135,9 +139,6 @@ serve:
#
allowed_methods:
- PATCH
- PUT
- GET
- HEAD

## Allowed Request HTTP Headers ##
#
Expand All @@ -152,11 +153,10 @@ serve:
# > set SERVE_CORS_ALLOWED_HEADERS=<value>
#
allowed_headers:
- Ut exercitation ea Lorem
- do non laborum
- fugiat sit ut occaecat officia
- ex
- adipisicing
- esse
- Lorem
- voluptate esse aliquip nisi cillum
- cillum id in consectetur laborum

## Allowed Response HTTP Headers ##
#
Expand All @@ -171,11 +171,8 @@ serve:
# > set SERVE_CORS_EXPOSED_HEADERS=<value>
#
exposed_headers:
- Ut velit in nulla
- aliqua cillum
- cupidatat Ut
- elit laborum consectetur dolore
- et
- anim eu ut
- cupidatat sint dolor nisi laboris

## Allow HTTP Credentials ##
#
Expand All @@ -201,7 +198,7 @@ serve:
# - Windows Command Line (CMD):
# > set SERVE_CORS_MAX_AGE=<value>
#
max_age: -43998662
max_age: -1910852

## Enable Debugging ##
#
Expand All @@ -215,7 +212,7 @@ serve:
# - Windows Command Line (CMD):
# > set SERVE_CORS_DEBUG=<value>
#
debug: true
debug: false

## HTTPS ##
#
Expand Down Expand Up @@ -272,13 +269,18 @@ serve:
#
# Enables CPU or memory profiling if set. For more details on profiling Go programs read [Profiling Go Programs](https://blog.golang.org/profiling-go-programs).
#
# One of:
# - cpu
# - mem
# - ""
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export PROFILING=<value>
# - Windows Command Line (CMD):
# > set PROFILING=<value>
#
profiling: ''
profiling: cpu

## Log ##
#
Expand All @@ -291,27 +293,39 @@ log:
#
# Default value: info
#
# One of:
# - panic
# - fatal
# - error
# - warn
# - info
# - debug
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export LOG_LEVEL=<value>
# - Windows Command Line (CMD):
# > set LOG_LEVEL=<value>
#
level: panic
level: error

## Format ##
#
# The log format can either be text or JSON.
#
# Default value: text
#
# One of:
# - text
# - json
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export LOG_FORMAT=<value>
# - Windows Command Line (CMD):
# > set LOG_FORMAT=<value>
#
format: json
format: text

## tracing ##
#
Expand All @@ -322,6 +336,9 @@ tracing:
#
# Set this to the tracing backend you wish to use. Currently supports jaeger. If omitted or empty, tracing will be disabled.
#
# One of:
# - jaeger
#
# Examples:
# - jaeger
#
Expand Down

0 comments on commit 767a875

Please sign in to comment.