-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
openapi.yml
93 lines (93 loc) · 2.44 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
85
86
87
88
89
90
91
92
93
openapi: 3.1.0
info:
title: Simple API
version: 1.0.0
description: A simple demo for zod-openapi
license:
name: MIT
servers:
- url: http://example.com/dev
description: Dev Endpoint
- url: http://example.com/prod
description: Prod Endpoint
security:
- s2sauth: []
paths:
/job:
get:
operationId: getJob
summary: Get Job
parameters:
- in: query
name: id
description: A unique identifier for a job
schema:
$ref: "#/components/schemas/jobId"
required: true
responses:
"200":
description: Successful operation
content:
application/json:
schema:
type: object
properties:
id:
$ref: "#/components/schemas/jobId"
title:
$ref: "#/components/schemas/jobTitle"
userId:
type: string
description: A unique identifier for a user
example: "60001234"
required:
- id
- title
- userId
description: Get Job Response
post:
operationId: createJob
summary: Create Job
requestBody:
content:
application/json:
schema:
type: object
properties:
title:
$ref: "#/components/schemas/jobTitle"
required:
- title
additionalProperties: false
description: Create Job Request
responses:
"201":
description: Successful creation
content:
application/json:
schema:
type: object
properties:
id:
$ref: "#/components/schemas/jobId"
required:
- id
description: Create Job Response
components:
securitySchemes:
s2sauth:
type: http
scheme: bearer
bearerFormat: JWT
description: An s2s token issued by an allow listed consumer
schemas:
jobId:
type: string
format: uuid
description: A unique identifier for a job
example: 4dd643ff-7ec7-4666-9c88-50b7d3da34e4
jobTitle:
type: string
minLength: 1
description: A name that describes the job
example: Mid level developer