-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
So, the folks at OpenAPI are attempting to solve the OpenAPI Schema Object <> JSON Schema Object problem with alternate schemas.
This approach can allow vendors to chose which formats from a predefined list they chose to support:
openapi: 3.0.2
info:
title: A sample using real JSON Schema and xsd
version: 1.0.0
paths:
/cat:
get:
responses:
'200':
description: Ok
content:
application/json:
schema:
type: object
x-oas-draft-alternateSchemas:
- type: json-schema
externalValue: ./cat-schema-draft-08.json
- type: json-schema
externalValue: ./cat-schema-draft-05.json
- type: json-content-rules
externalValue: ./cat-JCRschema.json
application/xml:
x-oas-draft-alternateSchemas:
- type: xml-schema
externalValue: ./cat-schema.xsd
- type: relax-ng
externalValue: ./cat-schema.ng
- type: schematron
externalValue: ./cat-schema.st
Folks would not need to support everything, but allow their tooling to be suplimented and extended. Of course supporting JSON Schema would be a default expectation for many, and XML Schema might be nice to chuck in their too.
Check out the OpenAPI issue for more information, but we should start supporting this like its a feature, and give them any feedback with stuff that goes wrong.
devjack, mhertogs, zabhi, jfoy, GenXXXX and 8 moredevjack, zabhi and handrews
Metadata
Metadata
Assignees
Labels
No labels