From ca9d9f1737701988b831e2b12ad900f67aab82fe Mon Sep 17 00:00:00 2001 From: Frank Kilcommins Date: Wed, 8 May 2024 17:32:27 +0100 Subject: [PATCH] chore: fix example indentation (#187) --- examples/1.0.0/oauth.workflow.yaml | 111 ++++++++++++++--------------- 1 file changed, 55 insertions(+), 56 deletions(-) diff --git a/examples/1.0.0/oauth.workflow.yaml b/examples/1.0.0/oauth.workflow.yaml index b05ba75..4af50a8 100644 --- a/examples/1.0.0/oauth.workflow.yaml +++ b/examples/1.0.0/oauth.workflow.yaml @@ -125,60 +125,59 @@ workflows: redirect_uri: type: string description: The redirect uri - steps: - - stepId: browser-authorize - description: >- - This URL is opened in the browser and redirects you back to - the registered redirect URI with an authorization code. - operationId: authorize - parameters: - - name: client_id - in: query - value: $inputs.client_id - - name: redirect_uri - in: query - value: $inputs.redirect_uri - - name: response_type - in: query - value: 'code' - - name: scope - in: query - value: 'read' - - name: state - in: query - value: '12345' - successCriteria: - - condition: $statusCode == 200 - - context: $response.body - condition: $.access_token != null - type: JSONPath - outputs: - code: $response.body.code # Not really, this is a query parameter - - - stepId: get-access-token - description: >- - This is where you get the token - operationId: get-token - requestBody: - contentType: application/x-www-form-urlencoded - payload: - grant_type: authorization_code - code: $steps.browser-authorize.outputs.code - redirect_uri: $inputs.redirect_uri - client_id: $inputs.client_id - client_secret: $inputs.client_secret - successCriteria: - - condition: $statusCode == 200 - - context: $response.body - condition: $.access_token != null - type: JSONPath - outputs: - access_token: $response.body.access_token - refresh_token: $response.body.refresh_token - expires_in: $response.body.expires_in - - outputs: - access_token: $steps.get-access-token.outputs.access_token - refresh_token: $steps.get-access-token.outputs.refresh_token - expires_in: $steps.get-access-token.outputs.expires_in + steps: + - stepId: browser-authorize + description: >- + This URL is opened in the browser and redirects you back to + the registered redirect URI with an authorization code. + operationId: authorize + parameters: + - name: client_id + in: query + value: $inputs.client_id + - name: redirect_uri + in: query + value: $inputs.redirect_uri + - name: response_type + in: query + value: 'code' + - name: scope + in: query + value: 'read' + - name: state + in: query + value: '12345' + successCriteria: + - condition: $statusCode == 200 + - context: $response.body + condition: $.access_token != null + type: JSONPath + outputs: + code: $response.body.code # Not really, this is a query parameter + + - stepId: get-access-token + description: >- + This is where you get the token + operationId: get-token + requestBody: + contentType: application/x-www-form-urlencoded + payload: + grant_type: authorization_code + code: $steps.browser-authorize.outputs.code + redirect_uri: $inputs.redirect_uri + client_id: $inputs.client_id + client_secret: $inputs.client_secret + successCriteria: + - condition: $statusCode == 200 + - context: $response.body + condition: $.access_token != null + type: JSONPath + outputs: + access_token: $response.body.access_token + refresh_token: $response.body.refresh_token + expires_in: $response.body.expires_in + outputs: + access_token: $steps.get-access-token.outputs.access_token + refresh_token: $steps.get-access-token.outputs.refresh_token + expires_in: $steps.get-access-token.outputs.expires_in