Skip to content

Commit

Permalink
fix: added etc labs core server-js
Browse files Browse the repository at this point in the history
  • Loading branch information
bakon committed Jul 7, 2019
1 parent e80ea90 commit b9f76b9
Show file tree
Hide file tree
Showing 8 changed files with 7,446 additions and 291 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ build
docs
.DS_Store
dist
__GENERATED_TYPES__
/**/build
78 changes: 78 additions & 0 deletions openrpc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"openrpc": "1.0.0",
"info": {
"title": "Simple RPC overview",
"version": "2.0.0"
},
"methods": [
{
"name": "createUser",
"description": "Creates a new user in the system. Duplicates are not allowed, first user is admin",
"params": [
{
"$ref": "#/components/contentDescriptors/userName"
},
{
"$ref": "#/components/contentDescriptors/password"
},
{
"$ref": "#/components/contentDescriptors/userRole"
}
],
"result": {
"name": "createAccountResult",
"description": "Retures success",
"schema": {
"title": "responseStatus",
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "User create success"
},
"message": {
"type": "string",
"description": "Returns info on new user."
}
}
}
},
"errors": [
{
"code": 250,
"data": [],
"message": "User Exists"
}
]
}
],
"components": {
"contentDescriptors": {
"userName": {
"name": "userName",
"description": "user name",
"required": true,
"schema": {
"title": "userName",
"type": "string"
}
},
"password": {
"name": "password",
"description": "user password",
"required": true,
"schema": {
"type": "string"
}
},
"userRole": {
"name": "userRole",
"description": "user role, first user is Admin by default",
"required": true,
"schema": {
"type": "string"
}
}
}
}
}

0 comments on commit b9f76b9

Please sign in to comment.