Closed niaeashes closed 1 year ago
Test API Schemata.
----
"$schema": http://json-schema.org/draft-04/hyper-schema
title: Resource
description: Example Resource
stability: development
type:
- object
definitions:
type:
description: Resource Type Name
oneOf:
- type: ["string"]
enum:
- type1
- type2
- type: ["null"]
properties:
type:
"$ref": "/schemata/resource#/definitions/type"
id: schemata/resource
This example has 2 problem.
interagent-hyper-schema.json
interagent-hyper-schema.json is required type and example
, or type: object
. Ref: https://github.com/interagent/prmd/blob/master/schemas/interagent-hyper-schema.json#L88
This problem is: how to convert oneOf
schema to humanized attribute's explain.
Sorry for the delay, we could probably loosen the hyper-schema definition as you suggest, though generating good documentation may be challenging. Do you have a sense of what you would like the result to look like?
I want to use (example):
Note: simple
type: ["null", "string"]
with "enum" schema is invalid. https://jsonschemalint.com/#/version/draft-04/markup/json?gist=22cb20d97158bce3b1a632ef165b6db6But, PRMD Verify is not support "oneOf" in definitions. so this schema is refuse via
rake schema:verify
, but I want to verify it.Any ideas? Update PRMD::Verify?
Error message: