Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- outfittr | 2019-01-21T13:51:37.150Z info: Valid specification file
- outfittr | 2019-01-21T13:51:37.162Z info: Specification file dereferenced
- outfittr | 2019-01-21T13:51:37.210Z info: No localhost or relative server found in spec file, added for testing in Swagger UI
- outfittr | 2019-01-21T13:51:37.210Z debug: Register: GET - /garments
- outfittr | 2019-01-21T13:51:37.211Z debug: GET - /garments
- outfittr | 2019-01-21T13:51:37.212Z debug: Spec-file does not have router property -> try generic controller name: garmentsController
- outfittr | 2019-01-21T13:51:37.212Z debug: Controller with generic controller name wasn't found either -> try Default one
- outfittr | 2019-01-21T13:51:37.212Z error: There is no controller for GET - /garments
- outfittr exited with code 0
- openapi: 3.0.2
- info:
- version: "1.0.0"
- title: Outfittr API
- paths:
- /swagger:
- x-swagger-pipe: swagger_raw
- ####################################### Garments ##############################################
- /garments:
- x-router-controller: garmentsController
- get:
- description: Returns an array of garments.
- operationId: indexGarments
- responses:
- "200":
- $ref: '#/components/schemas/Garment'
- default:
- $ref: "#/components/schemas/ErrorResponse"
- post:
- summary: Creates a new garment
- operationId: newGarment
- description: Adds garment to the system
- responses:
- '200':
- $ref: '#/components/schemas/Garment'
- default:
- $ref: "#/components/schemas/ErrorResponse"
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Garment'
- description: User that was created.
- /garments/{_id}:
- x-router-controller: garmentsController
- get:
- description: Returns one garment
- operationId: viewGarment
- parameters:
- - in: path
- name: _id
- schema:
- type: string
- required: true
- description: Numeric ID of the user to get
- responses:
- "200":
- $ref: '#/components/schemas/Garment'
- default:
- $ref: "#/components/schemas/ErrorResponse"
- ######################################## Users ################################################
- /users:
- x-router-controller: usersController
- get:
- description: Returns an array of users.
- operationId: indexUsers
- responses:
- "200":
- $ref: '#/components/schemas/User'
- default:
- $ref: "#/components/schemas/ErrorResponse"
- post:
- summary: Creates a new user
- operationId: newUser
- description: Adds user to the system
- responses:
- '200':
- $ref: '#/components/schemas/User'
- default:
- $ref: "#/components/schemas/ErrorResponse"
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/User'
- description: User that was created.
- /users/{_id}:
- x-router-controller: usersController
- get:
- description: Returns one user
- operationId: viewUser
- parameters:
- - in: path
- name: _id
- schema:
- type: string
- required: true
- description: Numeric ID of the user to get
- responses:
- "200":
- $ref: '#/components/schemas/User'
- default:
- $ref: "#/components/schemas/ErrorResponse"
- ####################################### Wardrobe ##############################################
- /wardrobe:
- x-router-controller: wardrobeController
- get:
- description: Returns an array of garments in the user's wardrobe.
- operationId: indexWardrobeItems
- responses:
- "200":
- $ref: '#/components/schemas/WardrobeItem'
- default:
- $ref: "#/components/schemas/ErrorResponse"
- post:
- summary: Creates a new wardrobe item
- operationId: newWardrobeItem
- description: Adds garment to the user's wardrobe in the system
- responses:
- '200':
- $ref: '#/components/schemas/WardrobeItem'
- default:
- $ref: "#/components/schemas/ErrorResponse"
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/WardrobeItem'
- description: User that was created.
- /wardrobeItem/{_id}:
- x-router-controller: wardrobeController
- get:
- description: Returns one wardrobe item
- operationId: viewWardrobeItem
- parameters:
- - in: path
- name: _id
- schema:
- type: string
- required: true
- description: Numeric ID of the user to get
- responses:
- "200":
- $ref: '#/components/schemas/WardrobeItem'
- default:
- $ref: "#/components/schemas/ErrorResponse"
- ###################################### Components #############################################
- servers:
- - url: outfittr.net
- - url: localhost:3000
- components:
- schemas:
- User:
- type: object
- required:
- - _id
- - email
- - username
- - password
- properties:
- _id:
- type: string
- description: unique ID given by Mongo.
- firstName:
- type: string
- description: First name of the user.
- lastName:
- type: string
- description: Last name of the user.
- email:
- type: string
- description: User's email address.
- username:
- type: string
- description: User's username (for login)
- password:
- type: string
- description: User's password (for login).
- create_date:
- type: string
- description: date that the user joined.
- __v:
- type: integer
- description: I have no idea.
- Garment:
- type: object
- required:
- - _id
- - type
- - imageLink
- properties:
- _id:
- type: string
- description: unique ID given by Mongo.
- type:
- type: string
- description: type of garment
- imageLink:
- type: string
- description: primary color of garment
- __v:
- type: integer
- description: I have no idea.
- WardrobeItem:
- type: object
- required:
- - _id
- - owner_id
- - garment_id
- properties:
- _id:
- type: string
- description: unique ID given by Mongo.
- unavailable:
- type: boolean
- description: Is the wardrobe item dirty, loaned out, or otherwise unavailable?
- owner_id:
- type: string
- description: foreign key linking this wardrobe item to its owner.
- garment_id:
- type: string
- description: foreign key linking this wadrobe item to the garment it is.
- torn:
- type: boolean
- description: Is the wardrobe item torn?
- reserveDate:
- type: string
- description: Optional - a date for which this wardrobe item must be worn
- reserveTilDate:
- type: string
- description: Optional - a date after which the wardrobe item cannot be worn until the reserveDate.
- __v:
- type: integer
- description: I have no idea.
- ErrorResponse:
- required:
- - message
- properties:
- message:
- type: string
Add Comment
Please, Sign In to add comment