@@ -92,7 +92,7 @@ export interface DictionaryOf {
9292}
9393
9494/**
95- * A user defined value. To be used when bubbling a generic parameter up to the top-level interface is
95+ * A user defined value. To be used when bubbling a generic parameter up to the top-level class is
9696 * inconvenient or impossible (e.g. for lists of user-defined values of possibly different types).
9797 *
9898 * Clients will allow providing a serializer/deserializer when reading/writing properties of this type,
@@ -139,7 +139,7 @@ export interface Property {
139139 codegenName ?: string ;
140140 /** An optional set of aliases for `name` */
141141 aliases ?: string [ ] ;
142- /** If the enclosing interface is a variants container, is this a property of the container and not a variant? */
142+ /** If the enclosing class is a variants container, is this a property of the container and not a variant? */
143143 containerProperty ?: boolean ;
144144 /** If this property has a quirk that needs special attention, give a short explanation about it */
145145 esQuirk ?: string ;
@@ -181,7 +181,7 @@ export interface BaseType {
181181 specLocation : string ;
182182}
183183
184- export type Variants = ExternalTag | InternalTag | Container ;
184+ export type Variants = ExternalTag | InternalTag | Container | Untagged ;
185185
186186export interface VariantBase {
187187 /**
@@ -208,6 +208,11 @@ export interface Container extends VariantBase {
208208 kind : 'container' ;
209209}
210210
211+ export interface Untagged extends VariantBase {
212+ kind : 'untagged' ;
213+ untypedVariant : TypeName ;
214+ }
215+
211216/**
212217 * Inherits clause (aka extends or implements) for an interface or request
213218 */
@@ -216,6 +221,12 @@ export interface Inherits {
216221 generics ?: ValueOf [ ] ;
217222}
218223
224+ export interface Behavior {
225+ type : TypeName ;
226+ generics ?: ValueOf [ ] ;
227+ meta ?: Record < string , string > ;
228+ }
229+
219230/**
220231 * An interface type
221232 */
@@ -232,7 +243,7 @@ export interface Interface extends BaseType {
232243 /**
233244 * Behaviors directly implemented by this interface
234245 */
235- behaviors ?: Inherits [ ] ;
246+ behaviors ?: Behavior [ ] ;
236247
237248 /**
238249 * Behaviors attached to this interface, coming from the interface itself (see `behaviors`)
@@ -271,12 +282,12 @@ export interface Request extends BaseType {
271282 // We can also pull path parameter descriptions on body properties they replace
272283
273284 /**
274- * Body type. Most often a list of properties (that can extend those of the inherited interface , see above), except for a
285+ * Body type. Most often a list of properties (that can extend those of the inherited class , see above), except for a
275286 * few specific cases that use other types such as bulk (array) or create (generic parameter). Or NoBody for requests
276287 * that don't have a body.
277288 */
278289 body : Body ;
279- behaviors ?: Inherits [ ] ;
290+ behaviors ?: Behavior [ ] ;
280291 attachedBehaviors ?: string [ ] ;
281292}
282293
@@ -287,7 +298,7 @@ export interface Response extends BaseType {
287298 kind : 'response' ;
288299 generics ?: TypeName [ ] ;
289300 body : Body ;
290- behaviors ?: Inherits [ ] ;
301+ behaviors ?: Behavior [ ] ;
291302 attachedBehaviors ?: string [ ] ;
292303 exceptions ?: ResponseException [ ] ;
293304}
@@ -335,6 +346,7 @@ export interface EnumMember {
335346 description ?: string ;
336347 deprecation ?: Deprecation ;
337348 since ?: string ;
349+ availability ?: Availabilities ;
338350}
339351
340352/**
@@ -358,8 +370,11 @@ export interface TypeAlias extends BaseType {
358370 type : ValueOf ;
359371 /** generic parameters: either concrete types or open parameters from the enclosing type */
360372 generics ?: TypeName [ ] ;
361- /** Only applicable to `union_of` aliases: identify typed_key unions (external) and variant inventories (internal) */
362- variants ?: InternalTag | ExternalTag ;
373+ /**
374+ * Only applicable to `union_of` aliases: identify typed_key unions (external), variant inventories (internal)
375+ * and untagged variants
376+ */
377+ variants ?: InternalTag | ExternalTag | Untagged ;
363378}
364379
365380// ------------------------------------------------------------------------------------------------
@@ -438,6 +453,14 @@ export interface UrlTemplate {
438453}
439454
440455export interface Model {
456+ _info ?: {
457+ title : string ;
458+ license : {
459+ name : string ;
460+ url : string ;
461+ } ;
462+ } ;
463+
441464 types : TypeDefinition [ ] ;
442465 endpoints : Endpoint [ ] ;
443466}
0 commit comments