swagger: "2.0"
info:
version: "1.0.0"
title: "CCA API"
host: localhost:1337
basePath: /v1
schemes:
- http
consumes:
- application/json
produces:
- application/json
paths:
/user/login:
post:
description: Access a user account
summary: User Account Access
operationId: loginAccount
parameters:
- name: email
dataType: string
in: body
required: true
description: Your email
- name: password
dataType: string
in: body
required: true
description: Your password
responses:
"200":
description: Successfully signed in
schema:
type: object
properties:
email:
type: string
firstName:
type: string
lastName:
type: string
token:
type: string
userType:
type: string
401:
description: Invalid email or password.
Which is a correct way to write yaml file? I have this error: "Not a valid parameter definition" in each declaration of the parameters...
I would also like to know the correct way to integrate Sails JS with Swagger?