forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathissue_21259.yaml
More file actions
62 lines (62 loc) · 1.54 KB
/
issue_21259.yaml
File metadata and controls
62 lines (62 loc) · 1.54 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
#Modified from the original
openapi: 3.0.1
info:
title: Minimal API for Bug Report
version: v1
paths:
/test:
post:
summary: Test endpoint with MyCustomSpeed
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TestPayload'
responses:
'200':
description: OK
components:
schemas:
MyNumericValue:
type: object
properties:
lmnop:
type: number
description: A numeric value (e.g., 0 to 1).
MyCustomSpeed:
oneOf:
- $ref: '#/components/schemas/MyNumericValue'
- type: string
enum:
- "fixed-value-a"
- "fixed-value-b"
- "fixed-value-c"
- type: string
format: date
- type: string
format: date-time
- type: integer
format: int64
enum: [10, 20, 30]
- type: array
items:
type: number
- type: array
items:
- type: object
- type: array
items:
- type: string
enum:
# It seems enums within arrays don't work. Leaving this here, though
- "oneof-array-enum-a"
- "oneof-array-enum-b"
- "oneof-array-enum-c"
- type:
description: A value that can be a number or a specific string.
TestPayload:
type: object
properties:
speed_setting:
$ref: '#/components/schemas/MyCustomSpeed'