Skip to content

Commit cb99f1c

Browse files
authored
Typescript generator lookupBehavior behavior (#163)
1 parent 3e1f4df commit cb99f1c

File tree

31 files changed

+653
-844
lines changed

31 files changed

+653
-844
lines changed

docs/behaviors.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Behaviors
22

3-
Some APIs needs to be handled differenlty based on the output language, while others share many common parameters.
3+
Some APIs needs to be handled differently based on the output language, while others share many common parameters.
44
This document contains the list of this special interfaces and where those should be used.
55
Behaviors should be used via `implements` in the specification.
66

@@ -25,11 +25,14 @@ Some languages can't represent this easily and need to wrap the
2525
array inside an object.
2626

2727
```ts
28+
class CatResponseBase
29+
implements ArrayResponseBase<CatAliasesRecord> {}
2830
class CatAliasesResponse
29-
extends ResponseBase
30-
implements ArrayResponseBase<CatAliasesRecord> {}
31+
extends CatResponseBase {}
3132
```
3233

34+
Hint this also showcases that behaviors can be inherited
35+
3336
## EmptyResponseBase
3437

3538
HEAD APIs can have a different behavior based on the language,
@@ -60,4 +63,4 @@ Since these can break the request structure these are listed explicitly as a beh
6063

6164
```ts
6265
class CatRequestBase extends RequestBase implements CommonCatQueryParameters {}
63-
```
66+
```

0 commit comments

Comments
 (0)