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