File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,19 @@ export class Interface extends BaseType {
260260 variants ?: Container
261261}
262262
263+ /**
264+ * The Example type is used for both requests and responses
265+ * This type definition is taken from the OpenAPI spec
266+ * https://spec.openapis.org/oas/v3.1.0#example-object
267+ * With the exception of using String as the 'value' type
268+ */
269+ export class Example {
270+ summary ?: string
271+ description ?: string
272+ value ?: string
273+ external_value ?: string
274+ }
275+
263276/**
264277 * A request type
265278 */
@@ -288,6 +301,7 @@ export class Request extends BaseType {
288301 body : Body
289302 behaviors ?: Behavior [ ]
290303 attachedBehaviors ?: string [ ]
304+ examples ?: Map < string , Example >
291305}
292306
293307/**
@@ -300,6 +314,7 @@ export class Response extends BaseType {
300314 behaviors ?: Behavior [ ]
301315 attachedBehaviors ?: string [ ]
302316 exceptions ?: ResponseException [ ]
317+ examples ?: Map < string , Example >
303318}
304319
305320export class ResponseException {
You can’t perform that action at this time.
0 commit comments