<gh_stars>0
{"swagger":"2.0","info":{"title":"The Authentication API ","description":"An Authentication API","version":""},"host":"localhost:8080","schemes":["http"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/api/login":{"post":{"tags":["User"],"summary":"login User","description":"Sign a user in","operationId":"User#login","produces":["application/vnd.goa.error","application/vnd.token+json"],"parameters":[{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/LoginPayload"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Token"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"500":{"description":"Internal Server Error"}},"schemes":["http"]}},"/api/register":{"post":{"tags":["User"],"summary":"register User","description":"Create a new user","operationId":"User#register","produces":["application/vnd.goa.error","application/vnd.token+json"],"parameters":[{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/RegisterPayload"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Token"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"500":{"description":"Internal Server Error"}},"schemes":["http"]}},"/swagger.json":{"get":{"summary":"Download swagger/swagger.json","operationId":"swagger#/swagger.json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}}},"definitions":{"LoginPayload":{"title":"LoginPayload","type":"object","properties":{"email":{"type":"string","example":"<EMAIL>","format":"email","minLength":6,"maxLength":400},"password":{"type":"string","example":"<PASSWORD>","minLength":5,"maxLength":100}},"example":{"email":"<EMAIL>","password":"<PASSWORD>"},"required":["email","password"]},"RegisterPayload":{"title":"RegisterPayload","type":"object","properties":{"email":{"type":"string","example":"<EMAIL>","format":"email","minLength":6,"maxLength":150},"first_name":{"type":"string","example":"John","minLength":1,"maxLength":200},"last_name":{"type":"string","example":"Doe","minLength":1,"maxLength":200},"password":{"type":"string","example":"<PASSWORD>","minLength":5,"maxLength":100}},"example":{"email":"<EMAIL>","first_name":"John","last_name":"Doe","password":"<PASSWORD>"},"required":["email","password","first_name","last_name"]},"Token":{"title":"Mediatype identifier: application/vnd.token+json; view=default","type":"object","properties":{"token":{"type":"string","description":"A JWT token","example":"In harum."}},"description":"A token (default view)","example":{"token":"In harum."}},"error":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"code":{"type":"string","description":"an application-specific error code, expressed as a string value.","example":"invalid_value"},"detail":{"type":"string","description":"a human-readable explanation specific to this occurrence of the problem.","example":"Value of ID must be an integer"},"id":{"type":"string","description":"a unique identifier for this particular occurrence of the problem.","example":"3F1FKVRR"},"meta":{"type":"object","description":"a meta object containing non-standard meta-information about the error.","example":{"timestamp":1458609066},"additionalProperties":true},"status":{"type":"string","description":"the HTTP status code applicable to this problem, expressed as a string value.","example":"400"}},"description":"Error response media type (default view)","example":{"code":"invalid_value","detail":"Value of ID must be an integer","id":"3F1FKVRR","meta":{"timestamp":1458609066},"status":"400"}}},"responses":{"InternalServerError":{"description":"Internal Server Error"}}}