File: circularSpec.yaml

package info (click to toggle)
golang-github-go-openapi-validate 0.20.3-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 6,412 kB
  • sloc: sh: 11; makefile: 4
file content (67 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download | duplicates (8)
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
---
swagger: "2.0"
info:
  title: Swagger Sample
  description: Sample API Playground.
  version: 1.0.0
basePath: /v1
schemes:
- http
consumes:
- application/vdn.sample.v1+json
produces:
- application/vdn.sample.v1+json

paths:
  /books:
    get:
      summary: List all books
      operationId: listBooks
      tags:
        - books
      responses:
        200:
          headers:
            Link:
              type: string
          description: An array of books
          schema:
            type: array
            items:
              $ref: "#/definitions/Book"
        default:
          description: generic error response
          schema:
            $ref: "#/definitions/Error"

definitions:
  Book:
    type: object
    required:
      - title
      - summary
    properties:
      title:
        type: string
        example: Winnie the Pooh
      summary:
        type: string
        example: Famous children's book
      related_books:
        type: array
        items:
          $ref: "#/definitions/Book"

  Error:
    type: object
    readOnly: true
    properties:
      code:
        type: integer
        format: int64
        example: 400
      message:
        type: string
        example: Unexpected error
    required:
      - message