Skip to content

Commit aa017cb

Browse files
authored
Merge pull request #4703 from handrews/test-31
Test Schema Object extension fields on v3.1-dev
2 parents 21751b1 + d287f99 commit aa017cb

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
openapi: 3.1.0
2+
info:
3+
summary: Testing jsonSchemaDialect
4+
title: My API
5+
version: 1.0.0
6+
license:
7+
name: Apache 2.0
8+
identifier: Apache-2.0
9+
jsonSchemaDialect: https://spec.openapis.org/oas/3.1/dialect/WORK-IN-PROGRESS
10+
components:
11+
schemas:
12+
WithDollarSchema:
13+
$id: "locked-metaschema"
14+
$schema: https://spec.openapis.org/oas/3.1/dialect/WORK-IN-PROGRESS
15+
paths: {}

tests/schema/pass/media-type-examples.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,26 @@ paths:
3030
breed: Mixed
3131
frog:
3232
$ref: '#/components/examples/frog-example'
33+
application/xml:
34+
schema:
35+
type: object
36+
properties:
37+
foo:
38+
type: string
39+
xml:
40+
namespace: https://example.com
41+
prefix: example
42+
name: Foo
43+
bar:
44+
type: array
45+
items:
46+
type: number
47+
xml:
48+
wrapped: true
49+
attr:
50+
type: string
51+
xml:
52+
attribute: true
3353
application/x-www-form-urlencoded:
3454
schema:
3555
type: object
@@ -94,4 +114,4 @@ paths:
94114
allowReserved: true
95115
forCoverage2:
96116
style: spaceDelimited
97-
explode: true
117+
explode: true

tests/schema/pass/mega.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ info:
66
license:
77
name: Apache 2.0
88
identifier: Apache-2.0
9-
jsonSchemaDialect: https://spec.openapis.org/oas/3.1/dialect/base
109
paths:
1110
/:
1211
get:
@@ -20,6 +19,12 @@ components:
2019
securitySchemes:
2120
mtls:
2221
type: mutualTLS
22+
schemas:
23+
Foo:
24+
type: object
25+
properties:
26+
type:
27+
const: foo
2328
pathItems:
2429
myPathItem:
2530
post:
@@ -28,6 +33,9 @@ components:
2833
content:
2934
'application/json':
3035
schema:
36+
externalDocs:
37+
description: More docs!
38+
url: https://example.com/elsewhere.html
3139
type: object
3240
properties:
3341
type:
@@ -45,5 +53,9 @@ components:
4553
type: ['string','null']
4654
discriminator:
4755
propertyName: type
56+
mapping:
57+
foo: Foo
4858
x-extension: true
59+
anyOf:
60+
- $ref: "#/components/schemas/Foo"
4961
myArbitraryKeyword: true

0 commit comments

Comments
 (0)