Skip to content

Commit 76409f4

Browse files
committed
Initialize schemas from v3.1
1 parent e9eef10 commit 76409f4

File tree

4 files changed

+1085
-0
lines changed

4 files changed

+1085
-0
lines changed

src/schemas/validation/dialect.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
$id: https://spec.openapis.org/oas/3.1/dialect/WORK-IN-PROGRESS
2+
$schema: https://json-schema.org/draft/2020-12/schema
3+
4+
title: OpenAPI 3.1 Schema Object Dialect
5+
description: A JSON Schema dialect describing schemas found in OpenAPI v3.1 Descriptions
6+
7+
$dynamicAnchor: meta
8+
9+
$vocabulary:
10+
https://json-schema.org/draft/2020-12/vocab/applicator: true
11+
https://json-schema.org/draft/2020-12/vocab/content: true
12+
https://json-schema.org/draft/2020-12/vocab/core: true
13+
https://json-schema.org/draft/2020-12/vocab/format-annotation: true
14+
https://json-schema.org/draft/2020-12/vocab/meta-data: true
15+
https://json-schema.org/draft/2020-12/vocab/unevaluated: true
16+
https://json-schema.org/draft/2020-12/vocab/validation: true
17+
https://spec.openapis.org/oas/3.1/vocab/base: false
18+
19+
allOf:
20+
- $ref: https://json-schema.org/draft/2020-12/schema
21+
- $ref: https://spec.openapis.org/oas/3.1/meta/WORK-IN-PROGRESS

src/schemas/validation/meta.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
$id: https://spec.openapis.org/oas/3.1/meta/WORK-IN-PROGRESS
2+
$schema: https://json-schema.org/draft/2020-12/schema
3+
4+
title: OAS Base Vocabulary
5+
description: A JSON Schema Vocabulary used in the OpenAPI Schema Dialect
6+
7+
$dynamicAnchor: meta
8+
9+
$vocabulary:
10+
https://spec.openapis.org/oas/3.1/vocab/base: true
11+
12+
type:
13+
- object
14+
- boolean
15+
properties:
16+
discriminator:
17+
$ref: '#/$defs/discriminator'
18+
example: true
19+
externalDocs:
20+
$ref: '#/$defs/external-docs'
21+
xml:
22+
$ref: '#/$defs/xml'
23+
24+
$defs:
25+
discriminator:
26+
$ref: '#/$defs/extensible'
27+
properties:
28+
mapping:
29+
additionalProperties:
30+
type: string
31+
type: object
32+
propertyName:
33+
type: string
34+
required:
35+
- propertyName
36+
type: object
37+
unevaluatedProperties: false
38+
39+
extensible:
40+
patternProperties:
41+
^x-: true
42+
external-docs:
43+
$ref: '#/$defs/extensible'
44+
properties:
45+
description:
46+
type: string
47+
url:
48+
format: uri-reference
49+
type: string
50+
required:
51+
- url
52+
type: object
53+
unevaluatedProperties: false
54+
55+
xml:
56+
$ref: '#/$defs/extensible'
57+
properties:
58+
attribute:
59+
type: boolean
60+
name:
61+
type: string
62+
namespace:
63+
format: uri
64+
type: string
65+
prefix:
66+
type: string
67+
wrapped:
68+
type: boolean
69+
type: object
70+
unevaluatedProperties: false
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
$id: 'https://spec.openapis.org/oas/3.1/schema-base/WORK-IN-PROGRESS'
2+
$schema: 'https://json-schema.org/draft/2020-12/schema'
3+
4+
description: The description of OpenAPI v3.1.x Documents using the OpenAPI JSON Schema dialect
5+
6+
$ref: 'https://spec.openapis.org/oas/3.1/schema/WORK-IN-PROGRESS'
7+
properties:
8+
jsonSchemaDialect:
9+
$ref: '#/$defs/dialect'
10+
11+
$defs:
12+
dialect:
13+
const: 'https://spec.openapis.org/oas/3.1/dialect/WORK-IN-PROGRESS'
14+
15+
schema:
16+
$dynamicAnchor: meta
17+
$ref: 'https://spec.openapis.org/oas/3.1/dialect/WORK-IN-PROGRESS'
18+
properties:
19+
$schema:
20+
$ref: '#/$defs/dialect'

0 commit comments

Comments
 (0)