Created
September 23, 2018 21:41
-
-
Save mikolajprzybysz/b9cf6d5e2382366764210bc680933cac 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 | |
info: | |
title: Time track API | |
version: 0.1.0 | |
servers: | |
- url: http://localhost/v1 | |
description: Local development | |
paths: | |
/books/{id}: | |
get: | |
operationId: getBook | |
parameters: | |
- name: id | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: Returns book resource | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/book' | |
'404': | |
description: Book resource not found | |
content: | |
applicaiton/json: | |
schema: | |
$ref: '#/components/schemas/error' | |
components: | |
schemas: | |
book: | |
required: | |
- title | |
- author | |
properties: | |
title: | |
type: string | |
author: | |
type: string | |
error: | |
required: | |
- code | |
- message | |
properties: | |
code: | |
type: integer | |
format: int32 | |
message: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment