Created
April 23, 2018 20:25
-
-
Save shockey/852d839ad3540c797b027281e1fe565e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
servers: | |
- url: /api | |
info: | |
title: basejs API | |
version: 0.0.1 | |
description: Documentation of the RESTful API exposed by basejs | |
security: | |
- JWT: [] | |
paths: | |
'/products/{id}': | |
parameters: | |
- $ref: '#/components/parameters/idParam' | |
get: | |
tags: | |
- Products | |
description: Get a product by id | |
responses: | |
'200': | |
description: Product | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Product' | |
default: | |
$ref: '#/components/responses/ErrorResponse' | |
tags: [] | |
components: | |
responses: | |
ErrorResponse: | |
description: Error | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Error' | |
parameters: | |
idParam: | |
name: id | |
in: path | |
description: id of item | |
required: true | |
schema: | |
type: string | |
securitySchemes: | |
JWT: | |
type: http | |
scheme: bearer | |
bearerFormat: Bearer | |
schemas: | |
Product: | |
type: object | |
required: | |
- title | |
properties: | |
_id: | |
type: string | |
readOnly: true | |
title: | |
type: string | |
price: | |
type: number | |
ownerId: | |
type: string | |
createdAt: | |
type: string | |
format: date-time | |
readOnly: true | |
updatedAt: | |
type: string | |
format: date-time | |
readOnly: true | |
Error: | |
type: object | |
required: | |
- statusCode | |
properties: | |
statusCode: | |
type: integer | |
error: | |
type: string | |
message: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment