diff --git a/docs/.widdershins/templates/main.dot b/docs/.widdershins/templates/main.dot index bae434fd03..5bd79af7e8 100644 --- a/docs/.widdershins/templates/main.dot +++ b/docs/.widdershins/templates/main.dot @@ -1,14 +1,21 @@ {{? data.api.info.description}}{{=data.api.info.description}}{{?}} -> You are viewing REST API documentation. This documentation is auto-generated from a swagger specification which +import Tabs from '@theme/Tabs' +import TabItem from '@theme/TabItem' + +:::info + +You are viewing REST API documentation. This documentation is auto-generated from a swagger specification which itself is generated from annotations in the source code of the project. It is possible that this documentation includes bugs and that code samples are incomplete or wrong. -> -> If you find issues in the respective documentation, please do not edit the + +If you find issues in the respective documentation, please do not edit the Markdown files directly (as they are generated) but raise an issue on the project's GitHub presence instead. This documentation will improve over time with your help! If you have ideas how to improve this part of the documentation, feel free to share them in a [GitHub issue](https://github.com/ory/docs/issues/new) any time. +::: + {{? data.api.components && data.api.components.securitySchemes }} {{#def.security}} {{?}} @@ -17,6 +24,7 @@ share them in a [GitHub issue](https://github.com/ory/docs/issues/new) any time. {{ data.resource = data.resources[r]; }} + ## {{= r}} {{? data.resource.description }}{{= data.resource.description}}{{?}} diff --git a/docs/.widdershins/templates/operation.dot b/docs/.widdershins/templates/operation.dot index 32ad3d3cf5..c04df1bb83 100644 --- a/docs/.widdershins/templates/operation.dot +++ b/docs/.widdershins/templates/operation.dot @@ -56,27 +56,18 @@ Accept: {{=data.produces[0]}}{{?}} {{? data.options.codeSamples || data.operation["x-code-samples"] }} #### Code samples -
- -
-
+ + ```shell curl -X {{=data.methodUpper}} {{=data.url}}{{=data.requiredQueryString}}{{?data.allHeaders.length}} \{{?}} {{~data.allHeaders :p:index}} -H '{{=p.name}}: {{=p.exampleValues.object}}'{{?index < data.allHeaders.length-1}} \{{?}}{{~}} ``` -
-
+ + ```go package main @@ -103,10 +94,10 @@ func main() {{{?data.allHeaders.length}} } ``` -
-
+ + -```nodejs +```javascript const fetch = require('node-fetch'); {{?data.bodyParameter.present}}const input = '{{=data.bodyParameter.exampleValues.json}}';{{?}} {{?data.allHeaders.length}}const headers = { @@ -124,8 +115,8 @@ fetch('{{=data.url}}{{=data.requiredQueryString}}', { }) ``` -
-
+ + ```java // This sample needs improvement. @@ -150,8 +141,8 @@ in.close(); System.out.println(response.toString()); ``` -
-
+ + ```python import requests @@ -169,8 +160,8 @@ r = requests.{{=data.method.verb}}( print r.json() ``` -
-
+ + ```ruby require 'rest-client' @@ -188,7 +179,6 @@ result = RestClient.{{=data.method.verb}} '{{=data.url}}', p JSON.parse(result) ``` -
-
-
+ + {{?}} diff --git a/docs/.widdershins/templates/parameters.def b/docs/.widdershins/templates/parameters.def index 4bb8cd770b..9da4ed4145 100644 --- a/docs/.widdershins/templates/parameters.def +++ b/docs/.widdershins/templates/parameters.def @@ -1,5 +1,6 @@ -##### Parameters + +#### Parameters |Parameter|In|Type|Required|Description| |---|---|---|---|---| @@ -7,7 +8,9 @@ {{~}} {{? data.longDescs }} + ##### Detailed descriptions + {{~ data.parameters :p}}{{? p.shortDesc !== p.description}} **{{=p.name}}**: {{=p.description}}{{?}} {{~}}