Skip to content
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

Provide working example/test of an array attribute with object member subschema #290

Open
cgagon opened this issue Apr 28, 2016 · 1 comment

Comments

@cgagon
Copy link

cgagon commented Apr 28, 2016

I've produced a valid json schema but PRMD is unable to document an array member subschema, by ref, or by inline subschema. The verify task returns this error when it hits the array property:

No subschema in "anyOf" matched

This is only a problem of checking my schema against the interagent hyperschema. The schema itself is valid and works properly outside of documentation/verify.

items for the array def is pointing to a valid definition by ref (the uri is valid). Additionally, the documentation builder is unable to produce attribute information for the array members in the schema markdown. The attribute ends up as type "array", with the example noted, but no sub attribute information broken out.

Do all subschemas have to be broken out into files under schemata/ ? It would be great if that were not the case.

When I run validate actual data against the output schema, the subschema properly picks up validation errors. What is the problem with verify and array member subschemas? I don't see any clear documentation about this case. Thanks for your help!

@geemus
Copy link
Member

geemus commented Apr 29, 2016

Hey, we expect subschemas to be in separate files because we found it more convenient, but we generally use combine to pull them together before verifying or doing other operations. If you want to just work on the combined one I think you should be fine as long as you set it up correctly.

I don't expect anyOf errors to come from arrays in particular, it may be something else causing the issue as well.

Could you share the schema that you are seeing the issue with? I think that might be easier for me to work with/through than the more abstract error messages. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants