forked from deepmap/oapi-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
x-go-type-import-pet.yaml
102 lines (101 loc) · 2.5 KB
/
x-go-type-import-pet.yaml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
openapi: "3.0.0"
info:
version: 1.0.0
title: Swagger Petstore
description: A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification
termsOfService: http://swagger.io/terms/
contact:
name: Swagger API Team
email: apiteam@swagger.io
url: http://swagger.io
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: http://petstore.swagger.io/api
paths:
/pets/{id}:
get:
summary: Returns a pet by ID
description: Returns a pet based on a single ID
operationId: findPetByID
parameters:
- name: id
in: path
description: ID of pet to fetch
required: true
schema:
type: integer
format: int64
responses:
"200":
description: pet response
content:
application/json:
schema:
$ref: "#/components/schemas/Pet"
/person/{id}:
get:
summary: Returns a person by ID
description: Returns a person based on a single ID
operationId: findPersonByID
parameters:
- name: id
in: path
description: ID of person to fetch
required: true
schema:
type: integer
format: int64
responses:
"200":
description: person response
content:
application/json:
schema:
$ref: "#/components/schemas/Person"
/car/{id}:
get:
summary: Returns a car by ID
description: Returns a car based on a single ID
operationId: findCarByID
parameters:
- name: id
in: path
description: ID of car to fetch
required: true
schema:
type: integer
format: int64
responses:
"200":
description: car response
content:
application/json:
schema:
$ref: "#/components/schemas/Car"
components:
schemas:
Pet:
properties:
age:
x-go-type: myuuid.UUID
x-go-type-import:
path: github.com/google/uuid
name: myuuid
required:
- age
Person:
properties:
age:
x-go-type: pgext.Puint
x-go-type-import:
path: github.com/CavernaTechnologies/pgext
required:
- age
Car:
properties:
age:
type: integer
required:
- age