Skip to content

Commit

Permalink
fix: add examples to MediaTypeStruct
Browse files Browse the repository at this point in the history
  • Loading branch information
tabrindle committed Feb 12, 2021
1 parent 525672c commit 1eee799
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/components/responses/structs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@ const MediaTypeStruct = struct.interface({
SchemaStruct,
ReferenceStruct
])),
example: struct.optional(struct.union(['string', 'number', 'boolean', 'object', 'array']))
example: struct.optional(struct.union(['string', 'number', 'boolean', 'object', 'array'])),
examples: struct.optional(struct.dict(['string', struct.intersection([
'object',
struct.interface({
summary: 'string?',
description: 'string?',
value: struct.union(['string', 'number', 'boolean', 'object', 'array']),
externalValue: 'string?'
})
])]))
});

const LinkStruct = struct.intersection([
Expand Down

0 comments on commit 1eee799

Please sign in to comment.