Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- openapi: 3.0.0
- servers:
- - url: 'https://virtserver.swaggerhub.com/brooksn/API/1.0.0'
- - url: 'http://virtserver.swaggerhub.com/brooksn/API/1.0.0'
- info:
- description: This is a simple API
- version: 1.0.0
- title: The API
- paths:
- /login:
- post:
- summary: Request a client token in exchange for a username and password
- responses:
- '200':
- description: >-
- Username and password matched a User; returning the User and client
- token
- content:
- '*/*':
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- clientToken:
- type: string
- /login/resetPassword:
- post:
- summary: Request a password reset email for the selected account
- responses:
- '200':
- description: >-
- Indicates an password reset email has been sent to the email address
- on file for the account
- '404':
- description: >-
- Indicates the account associated with the provided email address was
- not found
- parameters:
- - name: email
- in: query
- description: the email address of the account whose password should be reset
- schema:
- type: string
- /users:
- get:
- security:
- - clientBearer: []
- summary: retrieve a list of Users
- responses:
- '200':
- description: An array of Users
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/User'
- post:
- security:
- - clientBearer: []
- summary: create a new User
- responses:
- '200':
- description: A new User
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/User'
- '/users/{userId}':
- patch:
- security:
- - clientBearer: []
- summary: update fields on a single user
- responses:
- '200':
- description: The updated User document
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/User'
- parameters:
- - name: userId
- in: path
- description: The id of a User object
- required: true
- schema:
- type: string
- get:
- security:
- - clientBearer: []
- summary: retrieve a single user
- responses:
- '200':
- description: A User
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/User'
- parameters:
- - name: userId
- in: path
- description: The id of a User object
- required: true
- schema:
- type: string
- '/users/{userId}/password':
- put:
- security:
- - clientBearer: []
- summary: Update a single User password
- responses:
- '200':
- description: A User has had its password updated
- parameters:
- - name: userId
- in: path
- description: The id of a User object
- required: true
- schema:
- type: string
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- oldPassword:
- type: string
- newPassword:
- type: string
- description: The password object
- required: true
- /projects:
- post:
- security:
- - clientBearer: []
- responses:
- '200':
- description: Create a new Project
- content:
- '*/*':
- schema:
- type: object
- properties:
- data:
- $ref: '#/components/schemas/Project'
- '400':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- '500':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- '/projects/{projectId}':
- parameters:
- - name: projectId
- in: path
- required: true
- description: id of Project object
- schema:
- type: string
- get:
- security:
- - clientBearer: []
- responses:
- '200':
- description: Retrieve a Project by id
- content:
- '*/*':
- schema:
- type: object
- properties:
- data:
- $ref: '#/components/schemas/Project'
- '400':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- '500':
- description: A description of a server error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- patch:
- security:
- - clientBearer: []
- responses:
- '200':
- description: Patch a Project by id and retrieve the updated object
- content:
- '*/*':
- schema:
- type: object
- properties:
- data:
- $ref: '#/components/schemas/Project'
- '400':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- '500':
- description: A description of a server error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- requestBody:
- content:
- application/json-patch+json:
- schema:
- $ref: '#/components/schemas/JsonPatch'
- description: JSON Patch per IETF RFC 6902
- required: true
- '/project/{projectId}/subscription':
- parameters:
- - name: projectId
- in: path
- required: true
- description: id of Project object
- schema:
- type: string
- post:
- security:
- - clientBearer: []
- responses:
- '200':
- description: Create a new subscription for a Project
- content:
- '*/*':
- schema:
- type: object
- properties:
- data:
- $ref: '#/components/schemas/Project'
- '400':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- '500':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- /bids:
- get:
- security:
- - clientBearer: []
- responses:
- '200':
- description: List Bids created by the logged-in User
- content:
- '*/*':
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/components/schemas/Bid'
- '400':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- '500':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- post:
- security:
- - clientBearer: []
- responses:
- '200':
- description: Create a new Bid for a Project
- content:
- '*/*':
- schema:
- type: object
- properties:
- data:
- $ref: '#/components/schemas/Bid'
- '400':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- '500':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- '/bids/{bidId}':
- parameters:
- - name: bidId
- in: path
- required: true
- description: The id of a Bid
- schema:
- type: string
- get:
- security:
- - clientBearer: []
- responses:
- '200':
- description: List Bids created by the logged-in User
- content:
- '*/*':
- schema:
- type: object
- properties:
- data:
- $ref: '#/components/schemas/Bid'
- '400':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- '500':
- description: A description of a client error
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Errors'
- '/invoices/{invoiceId}':
- get:
- security:
- - clientBearer: []
- summary: retrieve an Invoice
- responses:
- '200':
- description: An Invoice
- parameters:
- - name: invoiceId
- in: path
- required: true
- description: The id of an Invoice
- schema:
- type: string
- /messages:
- parameters: []
- post:
- security:
- - clientBearer: []
- summary: Get an array of project messages
- responses:
- '200':
- description: An array of messages
- content:
- '*/*':
- schema:
- $ref: '#/components/schemas/Message'
- '/messages/project/{projectId}':
- parameters:
- - name: projectId
- in: path
- required: true
- description: the ID of the project for which to retrieve messages
- schema:
- type: string
- get:
- security:
- - clientBearer: []
- summary: Get an array of project messages
- responses:
- '200':
- description: An array of messages
- content:
- '*/*':
- schema:
- type: object
- properties:
- messages:
- type: array
- items:
- $ref: '#/components/schemas/Message'
- /assets:
- post:
- security:
- - clientBearer: []
- summary: Upload a file
- responses:
- '200':
- description: An array of asset metadata
- content:
- '*/*':
- schema:
- type: object
- properties:
- messages:
- type: array
- items:
- $ref: '#/components/schemas/PublicFileMetaData'
- requestBody:
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- components:
- securitySchemes:
- clientBearer:
- type: http
- scheme: bearer
- bearerFormat: JWT
- schemas:
- User:
- type: object
- properties:
- id:
- type: string
- format: uuid
- created:
- $ref: '#/components/schemas/Date'
- type:
- type: string
- enum:
- - User
- username:
- type: string
- format: uuid
- userType:
- type: string
- enum:
- - buyer
- - manufacturer
- email:
- type: string
- format: email
- name:
- type: string
- Project:
- type: object
- properties:
- id:
- type: string
- format: uuid
- created:
- $ref: '#/components/schemas/Date'
- type:
- type: string
- enum:
- - Category
- name:
- type: string
- quantity:
- type: string
- notes:
- type: string
- category:
- $ref: '#/components/schemas/Category'
- Category:
- type: object
- properties:
- id:
- type: string
- format: uuid
- created:
- $ref: '#/components/schemas/Date'
- type:
- type: string
- enum:
- - Category
- name:
- type: string
- pluralized:
- type: string
- approved:
- type: boolean
- Message:
- type: object
- required:
- - event
- - messageText
- properties:
- id:
- type: string
- format: uuid
- created:
- $ref: '#/components/schemas/Date'
- type:
- type: string
- enum:
- - Message
- user:
- $ref: '#/components/schemas/User'
- manufacturer:
- type: string
- format: uuid
- event:
- type: string
- messageText:
- type: string
- Bid:
- type: object
- properties:
- id:
- type: string
- format: uuid
- created:
- $ref: '#/components/schemas/Date'
- type:
- type: string
- enum:
- - Bid
- user:
- $ref: '#/components/schemas/User'
- project:
- $ref: '#/components/schemas/Project'
- Invoice:
- type: object
- required:
- - usdOwed
- - reason
- properties:
- id:
- type: string
- format: uuid
- created:
- $ref: '#/components/schemas/Date'
- type:
- type: string
- enum:
- - Invoice
- usdOwed:
- type: string
- reason:
- type: string
- PublicFileMetaData:
- type: object
- properties:
- url:
- type: string
- mimetype:
- type: string
- JsonPatch:
- type: array
- items:
- $ref: '#/components/schemas/PatchItem'
- PatchItem:
- description: A JSONPatch document as defined by RFC 6902
- required:
- - op
- - path
- properties:
- op:
- type: string
- description: The operation to be performed
- enum:
- - add
- - remove
- - replace
- path:
- type: string
- description: A JSON-Pointer
- value:
- type: object
- description: The value to be used within the operations.
- from:
- type: string
- description: A string containing a JSON Pointer value.
- type: object
- Errors:
- type: array
- minItems: 1
- maxItems: 1
- items:
- $ref: '#/components/schemas/Error'
- Error:
- type: object
- required:
- - title
- - detail
- properties:
- title:
- type: string
- detail:
- type: string
- Date:
- type: string
- description: ISO 8601 date and time
- example: '2017-08-18T17:59:45.632Z'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement