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

Closes #33. Update apiary.apib. Add info about params validation. #34

Merged
merged 1 commit into from
Oct 2, 2017
Merged
Changes from all commits
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
40 changes: 35 additions & 5 deletions apiary.apib
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ Common workflow is following:

### Register new tenant [POST]

+ email `test@test.com` (string, required, email)

+ password `passwordA6` (string, required, min: 6, regex: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,}$)

+ Request (application/json)

{
"email": "test@test.com",
"password": "password"
"password": "passwordA6"
}

+ Response 200 (application/json)
Expand All @@ -46,6 +50,10 @@ Common workflow is following:

### Login tenant [POST]

+ email `test@test.com` (string, required, email)

+ password `passwordA6` (string, required, min: 6, regex: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,}$)

+ Request (application/json)

{
Expand All @@ -63,6 +71,8 @@ Common workflow is following:

### Logout tenant [POST]

+ accessToken `jwt` (string, required)

+ Request (application/json)

{
Expand All @@ -79,6 +89,8 @@ Common workflow is following:

### Verify tenant's token [POST]

+ token `jwt` (string, required)

+ Request (application/json)

{
Expand Down Expand Up @@ -126,12 +138,21 @@ or an object describing what operations user can perform with resources (e.g. {

### Create new user [POST]

+ email `test@test.com` (string, required, email)

+ login `test@test.com` (string, required)

+ password `passwordA6` (string, required)

+ sub `Application specific subject, e.g. some ID in 3rd party service` (string, required)

+ scope `scope` (optional)

+ Request (application/json)

{
"email": "test@test.com",
"login": "testuser",
"tenant": "tenant_id",
"password": "password",
"scope": "user_scope"
}
Expand All @@ -142,7 +163,6 @@ or an object describing what operations user can perform with resources (e.g. {
"id": "0107bfcf-2f42-4e83-99e9-3ba44b737302",
"login": "testuser",
"email": "test@test.com",
"tenant": "tenant_id",
"scope": "user_scope"
}

Expand All @@ -168,12 +188,18 @@ or an object describing what operations user can perform with resources (e.g. {

### Login [POST]

+ login `login` (string, required)

+ password `passwordA6` (string, required)

+ deviceId `someId` (string, required)

+ Request (application/json)

{
"login": "tenant_id:test@test.com",
"login": "user_login",
"password": "password_hash",
"scope": "user_scope"
"deviceId": "id"
}

+ Response 200 (application/json)
Expand Down Expand Up @@ -229,6 +255,8 @@ or an object describing what operations user can perform with resources (e.g. {

### Verify [POST]

+ token `token` (string, required)

+ Request (application/json)

{
Expand Down Expand Up @@ -259,6 +287,8 @@ or an object describing what operations user can perform with resources (e.g. {

### Logout [POST]

+ token `token` (string, required)

+ Request (application/json)

{
Expand Down