@@ -118,6 +118,125 @@ class JsonSchemaFeatures:
118118 status = "supported" ,
119119 ),
120120 )
121+ # --- Partially supported features ---
122+ const_support : bool = field (
123+ default = True ,
124+ metadata = FeatureMetadata (
125+ introduced = "Draft 6" ,
126+ doc_name = "const" ,
127+ description = "Single constant value constraint" ,
128+ status = "supported" ,
129+ ),
130+ )
131+ property_names : bool = field (
132+ default = True ,
133+ metadata = FeatureMetadata (
134+ introduced = "Draft 6" ,
135+ doc_name = "propertyNames" ,
136+ description = "Dict key type constraints via pattern, enum, or $ref" ,
137+ status = "supported" ,
138+ ),
139+ )
140+ contains : bool = field (
141+ default = False ,
142+ metadata = FeatureMetadata (
143+ introduced = "Draft 6" ,
144+ doc_name = "contains" ,
145+ description = "Array contains at least one matching item" ,
146+ status = "not_supported" ,
147+ ),
148+ )
149+ deprecated_keyword : bool = field (
150+ default = False ,
151+ metadata = FeatureMetadata (
152+ introduced = "2019-09" ,
153+ doc_name = "deprecated" ,
154+ description = "Marks schema elements as deprecated" ,
155+ status = "partial" ,
156+ ),
157+ )
158+ # --- Unsupported features ---
159+ if_then_else : bool = field (
160+ default = False ,
161+ metadata = FeatureMetadata (
162+ introduced = "Draft 7" ,
163+ doc_name = "if/then/else" ,
164+ description = "Conditional schema validation" ,
165+ status = "not_supported" ,
166+ ),
167+ )
168+ content_encoding : bool = field (
169+ default = False ,
170+ metadata = FeatureMetadata (
171+ introduced = "Draft 7" ,
172+ doc_name = "contentMediaType/contentEncoding" ,
173+ description = "Content type and encoding hints for strings" ,
174+ status = "not_supported" ,
175+ ),
176+ )
177+ anchor : bool = field (
178+ default = False ,
179+ metadata = FeatureMetadata (
180+ introduced = "2019-09" ,
181+ doc_name = "$anchor" ,
182+ description = "Location-independent schema references" ,
183+ status = "not_supported" ,
184+ ),
185+ )
186+ vocabulary : bool = field (
187+ default = False ,
188+ metadata = FeatureMetadata (
189+ introduced = "2019-09" ,
190+ doc_name = "$vocabulary" ,
191+ description = "Vocabulary declarations for meta-schemas" ,
192+ status = "not_supported" ,
193+ ),
194+ )
195+ unevaluated_properties : bool = field (
196+ default = False ,
197+ metadata = FeatureMetadata (
198+ introduced = "2019-09" ,
199+ doc_name = "unevaluatedProperties" ,
200+ description = "Additional properties not evaluated by subschemas" ,
201+ status = "not_supported" ,
202+ ),
203+ )
204+ unevaluated_items : bool = field (
205+ default = False ,
206+ metadata = FeatureMetadata (
207+ introduced = "2019-09" ,
208+ doc_name = "unevaluatedItems" ,
209+ description = "Additional items not evaluated by subschemas" ,
210+ status = "not_supported" ,
211+ ),
212+ )
213+ dependent_required : bool = field (
214+ default = False ,
215+ metadata = FeatureMetadata (
216+ introduced = "2019-09" ,
217+ doc_name = "dependentRequired" ,
218+ description = "Conditional property requirements" ,
219+ status = "not_supported" ,
220+ ),
221+ )
222+ dependent_schemas : bool = field (
223+ default = False ,
224+ metadata = FeatureMetadata (
225+ introduced = "2019-09" ,
226+ doc_name = "dependentSchemas" ,
227+ description = "Conditional schema application based on property presence" ,
228+ status = "not_supported" ,
229+ ),
230+ )
231+ dynamic_ref : bool = field (
232+ default = False ,
233+ metadata = FeatureMetadata (
234+ introduced = "2020-12" ,
235+ doc_name = "$dynamicRef/$dynamicAnchor" ,
236+ description = "Dynamic reference resolution across schemas" ,
237+ status = "not_supported" ,
238+ ),
239+ )
121240
122241 @classmethod
123242 def from_version (cls , version : JsonSchemaVersion ) -> JsonSchemaFeatures :
@@ -133,6 +252,8 @@ def from_version(cls, version: JsonSchemaVersion) -> JsonSchemaFeatures:
133252 definitions_key = "definitions" ,
134253 exclusive_as_number = False ,
135254 read_only_write_only = False ,
255+ const_support = False ,
256+ property_names = False ,
136257 )
137258 case JsonSchemaVersion .Draft6 :
138259 return cls (
@@ -208,6 +329,71 @@ class OpenAPISchemaFeatures(JsonSchemaFeatures):
208329 status = "supported" ,
209330 ),
210331 )
332+ webhooks : bool = field (
333+ default = False ,
334+ metadata = FeatureMetadata (
335+ introduced = "OAS 3.1" ,
336+ doc_name = "webhooks" ,
337+ description = "Top-level webhooks object for incoming events" ,
338+ status = "supported" ,
339+ ),
340+ )
341+ # --- Partially supported features ---
342+ ref_sibling_keywords : bool = field (
343+ default = False ,
344+ metadata = FeatureMetadata (
345+ introduced = "OAS 3.1" ,
346+ doc_name = "$ref with sibling keywords" ,
347+ description = "$ref can coexist with description, summary (no allOf workaround)" ,
348+ status = "partial" ,
349+ ),
350+ )
351+ # --- Unsupported features ---
352+ xml_support : bool = field (
353+ default = False ,
354+ metadata = FeatureMetadata (
355+ introduced = "OAS 3.0" ,
356+ doc_name = "xml" ,
357+ description = "XML serialization metadata (name, namespace, prefix)" ,
358+ status = "not_supported" ,
359+ ),
360+ )
361+ external_docs : bool = field (
362+ default = False ,
363+ metadata = FeatureMetadata (
364+ introduced = "OAS 3.0" ,
365+ doc_name = "externalDocs" ,
366+ description = "Reference to external documentation" ,
367+ status = "not_supported" ,
368+ ),
369+ )
370+ links : bool = field (
371+ default = False ,
372+ metadata = FeatureMetadata (
373+ introduced = "OAS 3.0" ,
374+ doc_name = "links" ,
375+ description = "Links between operations" ,
376+ status = "not_supported" ,
377+ ),
378+ )
379+ callbacks : bool = field (
380+ default = False ,
381+ metadata = FeatureMetadata (
382+ introduced = "OAS 3.0" ,
383+ doc_name = "callbacks" ,
384+ description = "Callback definitions for webhooks" ,
385+ status = "not_supported" ,
386+ ),
387+ )
388+ security_schemes : bool = field (
389+ default = False ,
390+ metadata = FeatureMetadata (
391+ introduced = "OAS 3.0" ,
392+ doc_name = "securitySchemes" ,
393+ description = "API security mechanism definitions" ,
394+ status = "not_supported" ,
395+ ),
396+ )
211397
212398 @classmethod
213399 def from_openapi_version (cls , version : OpenAPIVersion ) -> OpenAPISchemaFeatures :
@@ -238,6 +424,8 @@ def from_openapi_version(cls, version: OpenAPIVersion) -> OpenAPISchemaFeatures:
238424 read_only_write_only = True ,
239425 nullable_keyword = False ,
240426 discriminator_support = True ,
427+ webhooks = True ,
428+ ref_sibling_keywords = True ,
241429 )
242430
243431
0 commit comments