forked from sngular/scs-multiapi-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-test.yml
More file actions
79 lines (79 loc) · 2.05 KB
/
Copy pathapi-test.yml
File metadata and controls
79 lines (79 loc) · 2.05 KB
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
---
# Regression for additional OpenAPI 3.1 / JSON Schema 2020-12 features:
# - $defs as a schema source (#/$defs/Person) -> generates PersonDTO
# - prefixItems tuple arrays -> List<Object>
# - scalar type: "null" -> Object (no invalid `null` type)
# - nullable via ["T","null"] idiom even when listed as required -> no @NotNull
# - patternProperties object -> Map<String, T>
# - 3.1 binary string via contentEncoding -> MultipartFile
openapi: "3.1.0"
info:
version: 1.0.0
title: Gadget API (OpenAPI 3.1)
license:
name: MIT
servers:
- url: http://localhost:8080/v1
tags:
- name: gadget
paths:
/gadget:
get:
summary: Get a gadget
operationId: getGadget
tags:
- gadget
responses:
'200':
description: The requested gadget
content:
application/json:
schema:
$ref: "#/components/schemas/Gadget"
components:
schemas:
Gadget:
type: object
required:
- serial
properties:
id:
type: string
description: The unique gadget identifier
examples:
- "gadget-001"
legacyId:
type: string
deprecated: true
serial:
type: ["string", "null"]
example: "SN-12345"
payload:
type: string
contentEncoding: base64
coords:
type: array
prefixItems:
- type: number
- type: number
metadata:
type: object
patternProperties:
"^x-":
type: string
status:
type: string
description: Lifecycle status of the gadget
enum:
- ACTIVE
- RETIRED
nothing:
type: "null"
owner:
$ref: "#/$defs/Person"
$defs:
Person:
type: object
properties:
name:
type: string