Skip to content

Commit 94f4b26

Browse files
authored
Merge pull request #4704 from handrews/test-32
Test Schema Object extension fields on v3.2-dev
2 parents 6572370 + 27516b6 commit 94f4b26

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
openapi: 3.2.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.2/dialect/WORK-IN-PROGRESS
10+
components:
11+
schemas:
12+
WithDollarSchema:
13+
$id: "locked-metaschema"
14+
$schema: https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS
15+
paths: {}

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,26 @@ paths:
3333
application/jsonl:
3434
itemSchema:
3535
$ref: '#components/schemas/Pet'
36+
application/xml:
37+
schema:
38+
type: object
39+
properties:
40+
foo:
41+
type: string
42+
xml:
43+
namespace: https://example.com
44+
prefix: example
45+
name: Foo
46+
bar:
47+
type: array
48+
items:
49+
type: number
50+
xml:
51+
wrapped: true
52+
attr:
53+
type: string
54+
xml:
55+
attribute: true
3656
application/x-www-form-urlencoded:
3757
schema:
3858
type: object

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)