diff --git a/components/Credential.yml b/components/Credential.yml index f6a4711..fab6ed5 100644 --- a/components/Credential.yml +++ b/components/Credential.yml @@ -90,10 +90,13 @@ components: type: object description: The subject "proof": + type: object description: An optional proof for credentials that are secured using proof sets or chains. oneOf: - type: object - type: array + items: + type: object example: { "@context": diff --git a/respec-oas.js b/respec-oas.js index 61d33a2..eec80da 100644 --- a/respec-oas.js +++ b/respec-oas.js @@ -285,11 +285,16 @@ function renderJsonSchemaObject(schema) { } else if(schema.oneOf) { objectRendering += ' either '; let itemCount = 0; - for(item of schema.oneOf) { + for(const item of schema.oneOf) { if(item.type === 'string') { objectRendering += 'a string'; } else if(item.type === 'object') { objectRendering += renderJsonSchemaObject(item); + } else if(item.type === 'array') { + objectRendering += 'an array'; + if(item.items) { + objectRendering += ` of ${item.items.type}(s)`; + } } itemCount += 1; @@ -307,7 +312,7 @@ function renderJsonSchemaObject(schema) { } } else { objectRendering += 'an object of the following form: