fork of hey-api/openapi-ts because I need some additional things
1swagger: 2.0
2info:
3 title: OpenAPI 2.0 transforms read write example
4 version: 1
5produces:
6 - application/json
7consumes:
8 - application/json
9paths:
10 /foo-read:
11 post:
12 parameters:
13 - name: body
14 in: body
15 required: true
16 schema:
17 $ref: '#/definitions/FooRead'
18 responses:
19 '200':
20 schema:
21 $ref: '#/definitions/FooRead'
22 description: OK
23definitions:
24 FooRead:
25 allOf:
26 - $ref: '#/definitions/BarRead'
27 - type: object
28 properties:
29 foo:
30 readOnly: true
31 type: string
32 BarRead:
33 allOf:
34 - $ref: '#/definitions/Baz'
35 - type: object
36 properties:
37 bar:
38 readOnly: true
39 type: string
40 Baz:
41 type: object
42 properties:
43 baz:
44 type: string
45 QuxAllRead:
46 type: object
47 properties:
48 baz:
49 readOnly: true
50 type: string
51 Quux:
52 type: object
53 properties:
54 baz:
55 type: array
56 items:
57 $ref: '#/definitions/Baz'
58 qux:
59 $ref: '#/definitions/QuxAllRead'
60 Corge:
61 type: object
62 properties:
63 foo:
64 type: string
65 bar:
66 type: object
67 properties:
68 baz:
69 type: boolean
70 readOnly: true