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

feat: initialize thirdparty snippets #15

Merged
merged 2 commits into from
Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
urls: [
{url: "fspiop-rest-v1.0-openapi3-snippets.yaml", name: "v1.0"},
{url: "fspiop-rest-v1.1-openapi3-snippets.yaml", name: "v1.1"},
{url: "thirdparty-openapi3-snippets.yaml", name: "thirdparty"},
],
dom_id: '#swagger-ui',
deepLinking: true,
Expand Down
37 changes: 37 additions & 0 deletions docs/thirdparty-openapi3-snippets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
openapi: 3.0.2
info:
version: '0.1'
title: Thirdparty Snippets
description: |
Based on sequence diagrams
(https://github.com/mojaloop/pisp/tree/master/docs/out).
This is a work in progress.
license:
name: TBD
servers:
- url: '{protocol}://hostname:<port>/switch/'
variables:
protocol:
enum:
- http
- https
default: https
components:
schemas:
AccountAddress:
type: string
description: |
A long-lived unique account identifier provided by the DFSP this MUST NOT
kleyow marked this conversation as resolved.
Show resolved Hide resolved
be Bank Account Number or anything that may expose a User's private bank
account information.
pattern: '^([0-9A-Za-z_~\-\.]+[0-9A-Za-z_~\-])$'
minLength: 1
maxLength: 1023
paths:
/health:
get:
summary: This path is for demonstration purposes.
description: A valid OpenApi3 specification requires `paths` to be defined.
responses:
'200':
description: OK
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"buildv1.0": "swagger-cli bundle -t yaml -o docs/fspiop-rest-v1.0-openapi3-snippets.yaml v1.0/openapi3/index.yaml && swagger-cli validate docs/fspiop-rest-v1.0-openapi3-snippets.yaml",
"buildv1.1": "swagger-cli bundle -t yaml -o docs/fspiop-rest-v1.1-openapi3-snippets.yaml v1.1/openapi3/index.yaml && swagger-cli validate docs/fspiop-rest-v1.1-openapi3-snippets.yaml",
"buildThirdparty": "swagger-cli bundle -t yaml -o docs/thirdparty-openapi3-snippets.yaml thirdparty/openapi3/index.yaml && swagger-cli validate docs/thirdparty-openapi3-snippets.yaml",
kleyow marked this conversation as resolved.
Show resolved Hide resolved
"audit:resolve": "SHELL=sh resolve-audit --production",
"audit:check": "SHELL=sh check-audit --production"
},
Expand Down
22 changes: 22 additions & 0 deletions thirdparty/openapi3/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
openapi: 3.0.2
info:
$ref: ./info/index.yaml
servers:
- url: '{protocol}://hostname:<port>/switch/'
variables:
protocol:
enum:
- http
- https
default: https
components:
schemas:
$ref: ./schemas/index.yaml
paths:
/health:
get:
summary: This path is for demonstration purposes.
description: A valid OpenApi3 specification requires `paths` to be defined.
responses:
'200':
description: OK
8 changes: 8 additions & 0 deletions thirdparty/openapi3/info/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '0.1'
title: 'Thirdparty Snippets'
description: |
Based on sequence diagrams
(https://github.com/mojaloop/pisp/tree/master/docs/out).
This is a work in progress.
license:
name: TBD
8 changes: 8 additions & 0 deletions thirdparty/openapi3/schemas/AccountAddress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
type: string
description: |
A long-lived unique account identifier provided by the DFSP this MUST NOT
kleyow marked this conversation as resolved.
Show resolved Hide resolved
be Bank Account Number or anything that may expose a User's private bank
account information.
pattern: ^([0-9A-Za-z_~\-\.]+[0-9A-Za-z_~\-])$
minLength: 1
maxLength: 1023
2 changes: 2 additions & 0 deletions thirdparty/openapi3/schemas/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
AccountAddress:
$ref: ./AccountAddress.yaml