-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yml
84 lines (73 loc) · 2.28 KB
/
openapi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
openapi: 3.0.0
info:
title: The Library
description: A simple library API
contact:
name: developerjack
url: https://www.twitter.com/developerjack
license:
name: Proprietary
version: 0.0.1 #Spec version/revision - not the API or product version
servers:
- url: 'http://localhost:8080'
description: Local dev API.
tags:
- name: User
#- name: Book
#- name: Loan
paths:
/ping:
$ref: "endpoints/ping.yml#/paths/~1ping"
# /user:
# $ref: "endpoints/user.yml#/paths/~1user"
# todo: The user endpoints
# /user/{id}:
# $ref: "endpoints/user.yml#/paths/~1user~1{id}"
# todo: The book endpoints
# /book:
# $ref: "endpoints/book.yml#/paths/~1book"
# /book/{id}:
# $ref: "endpoints/book.yml#/paths/~1book~1{id}"
# todo: The loan endpoints
# /loan:
# $ref: "endpoints/loan.yml#/paths/~1loan"
# /loan/{id}:
# $ref: "endpoints/loan.yml#/paths/~1loan~1{id}"
components:
schemas:
ping:
$ref: 'schemas/ping.json'
# todo: user resources
# user:
# $ref: 'schemas/user.json'
# user-collection:
# $ref: 'schemas/user-collection.json'
# todo: book resources
# book:
# $ref: 'schemas/book.json'
# book-collection:
# $ref: 'schemas/book-collection.json'
# todo: loan resources
# loan:
# $ref: 'schemas/loan.json'
# loan-collection:
# $ref: 'schemas/loan-collection.json'
error:
type: object
required:
- id
- message
properties:
id:
type: string
description: "Unique ID of this error. For example sake, use the HTTP status code."
nullable: false
example: "500"
message:
type: string
description: "A human readable message describing the nature of the error."
nullable: false
path:
type: string
description: "A JSONpath reference to the field where the error occurred."
nullable: true