From acc6435f615a464cfa6fc3f7b94dfcdfeff7d5e6 Mon Sep 17 00:00:00 2001 From: Hubert Van De Walle Date: Tue, 21 Apr 2020 20:33:28 +0200 Subject: [PATCH] Update docs --- api-doc/users/index.apib | 4 ++-- public/index.html | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/api-doc/users/index.apib b/api-doc/users/index.apib index e4fd27c..ee601f8 100644 --- a/api-doc/users/index.apib +++ b/api-doc/users/index.apib @@ -14,7 +14,7 @@ # Group Accounts -## Create an account [/register] +## Create an account [/user] ### Register a new user [POST] @@ -33,7 +33,7 @@ + message: User already exists (string) -## Authenticate user [/login] +## Authenticate user [/user/login] Authenticate one user to access protected routing. ### Authenticate a user [POST] diff --git a/public/index.html b/public/index.html index 1e970fc..9e1a7f3 100644 --- a/public/index.html +++ b/public/index.html @@ -1,4 +1,4 @@ -Notes API

Notes API

Accounts

Create an account

POST http://localhost:5000/register
Requestsexample 1
Headers
Content-Type: application/json
Body
{
+Notes API

Notes API

Accounts

Create an account

POST http://localhost:5000/user
Requestsexample 1
Headers
Content-Type: application/json
Body
{
   "username": "babar",
   "email": "michel@seed-it.eu",
   "password": "tortue"
@@ -36,9 +36,8 @@
       "type": "string"
     }
   }
-}

Register a new user
POST/register


Authenticate user

Authenticate - one user to access protected routing.

-
POST http://localhost:5000/login
Requestsexample 1
Headers
Content-Type: application/json
Body
{
+}

Register a new user
POST/user


Authenticate user

Authenticate one user to access protected routing.

+
POST http://localhost:5000/user/login
Requestsexample 1
Headers
Content-Type: application/json
Body
{
   "username": "babar",
   "password": "tortue"
 }
Schema
{
@@ -80,7 +79,7 @@
       "type": "number"
     }
   }
-}

Authenticate a user
POST/login


Notes

Notes

GET http://localhost:5000/notes
Requestsexample 1
Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Responses200
Headers
Content-Type: application/json
Body
[
+}

Authenticate a user
POST/user/login


Notes

Notes

GET http://localhost:5000/notes
Requestsexample 1
Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Responses200
Headers
Content-Type: application/json
Body
[
   {
     "title": "Kotlin",
     "tags": [
@@ -218,7 +217,7 @@
       "type": "array"
     }
   }
-}

Get all tags
GET/tags


Generated by aglio on 20 Apr 2020