-
Notifications
You must be signed in to change notification settings - Fork 1
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
Create OAS 3.0 friendly schema versions #22
Comments
blocker for #1 |
Ideas so far:
Issues so far:
Tagging @pzaborowski here as well. |
Obviously our lives would be easier if we could simply forbid external |
So what seems like an antimatter to copy everything is actually forced by the tools... I think we should design with ref's and cache and annotate provenance in a way we can retrofit to legacy copies.. |
I'm adding a new item to "issues so far": mixing schema versions is not supported by some (most?) of the validation tools. For example, AJV can validate 2020-12, but once it starts resolving The JSON-FG schemas we reference from the bblocks, for example, are written in 2019-09. I think we should maybe 1) stick to a specific version for all the bblocks (i.e., force 2020-12), and if we need to reuse a schema, we apply something like alterschema and copy the result to the bblocks; and 2) use a single schema.json/schema.yaml for each bblock that only depends on other bblock schemas and not on external resources. This would solve all our problems, but perhaps at the cost of being too constrictive? |
yeah - lets work on the basis of design with what is available - but compile and convert local copies as required (mirroring manual processes), but inject metadata about the provenance of each copy. We need to establish what "interoperability means" for systems that use heterogeneous schema versions - but cross-testing test suites between systems might be a way forward. |
I've implemented a PoC for (simple) OAS 3.0-compatible schemas:
SwaggerHub seems to be able to parse this, and can even generate a client (albeit not very usable, due to the openapi: 3.0.0
info:
version: '0.1'
title: BBlocks Test
description: ''
paths:
/:
get:
responses:
'200':
description: Standard response
content:
application/json:
schema:
$ref: https://opengeospatial.github.io/bblocks/annotated-schemas/unstable/sosa/features/observationCollection/schema-oas3.0.json Obviously, this is a barely scratching the surface of the issue, but I think it's a start. |
All of the schema transformations sound good! However, OAS 3.0 does not allow |
Ah, right! I'll update the property name and cross my fingers. Thanks! |
@avillar if
|
Probably need to wrap this up as complete, but generate a new issue to determine testing and compatibility requirements for OGC APIs. |
I saw something weird going on with the oas3.0 versions yesterday, so I may have to double check that this is in fact working (thanks for the reminder!) |
status check? |
OAS cannot handle relative references in included schemas, nor the $schema keyword, and will require back-compiling $dynamicRefs and other modern keywords.
MVP is create version without $schema and absolute URIs.
The text was updated successfully, but these errors were encountered: