Skip to content

Test Schema Object extension fields on v3.1-dev #4703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/schema/pass/json_schema_dialect.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
openapi: 3.1.0
info:
summary: Testing jsonSchemaDialect
title: My API
version: 1.0.0
license:
name: Apache 2.0
identifier: Apache-2.0
jsonSchemaDialect: https://spec.openapis.org/oas/3.1/dialect/WORK-IN-PROGRESS
components:
schemas:
WithDollarSchema:
$id: "locked-metaschema"
$schema: https://spec.openapis.org/oas/3.1/dialect/WORK-IN-PROGRESS
paths: {}
22 changes: 21 additions & 1 deletion tests/schema/pass/media-type-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,26 @@ paths:
breed: Mixed
frog:
$ref: '#/components/examples/frog-example'
application/xml:
schema:
type: object
properties:
foo:
type: string
xml:
namespace: https://example.com
prefix: example
name: Foo
bar:
type: array
items:
type: number
xml:
wrapped: true
attr:
type: string
xml:
attribute: true
application/x-www-form-urlencoded:
schema:
type: object
Expand Down Expand Up @@ -94,4 +114,4 @@ paths:
allowReserved: true
forCoverage2:
style: spaceDelimited
explode: true
explode: true
14 changes: 13 additions & 1 deletion tests/schema/pass/mega.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ info:
license:
name: Apache 2.0
identifier: Apache-2.0
jsonSchemaDialect: https://spec.openapis.org/oas/3.1/dialect/base
paths:
/:
get:
Expand All @@ -20,6 +19,12 @@ components:
securitySchemes:
mtls:
type: mutualTLS
schemas:
Foo:
type: object
properties:
type:
const: foo
pathItems:
myPathItem:
post:
Expand All @@ -28,6 +33,9 @@ components:
content:
'application/json':
schema:
externalDocs:
description: More docs!
url: https://example.com/elsewhere.html
type: object
properties:
type:
Expand All @@ -45,5 +53,9 @@ components:
type: ['string','null']
discriminator:
propertyName: type
mapping:
foo: Foo
x-extension: true
anyOf:
- $ref: "#/components/schemas/Foo"
myArbitraryKeyword: true