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 {
260
260
variants ?: Container
261
261
}
262
262
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
+
263
276
/**
264
277
* A request type
265
278
*/
@@ -288,6 +301,7 @@ export class Request extends BaseType {
288
301
body : Body
289
302
behaviors ?: Behavior [ ]
290
303
attachedBehaviors ?: string [ ]
304
+ examples ?: Map < string , Example >
291
305
}
292
306
293
307
/**
@@ -300,6 +314,7 @@ export class Response extends BaseType {
300
314
behaviors ?: Behavior [ ]
301
315
attachedBehaviors ?: string [ ]
302
316
exceptions ?: ResponseException [ ]
317
+ examples ?: Map < string , Example >
303
318
}
304
319
305
320
export class ResponseException {
You can’t perform that action at this time.
0 commit comments