Skip to content

Commit e460a83

Browse files
committed
Expose QASectionsList outside of Getcontract
1 parent f51e9d5 commit e460a83

File tree

4 files changed

+62
-4
lines changed

4 files changed

+62
-4
lines changed

model/equaliq.smithy

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,20 @@ service EqualIQ {
2222
UploadProfilePicture
2323
UpdateProfile
2424
Ping
25+
ExposeTypes
2526
]
27+
28+
}
29+
30+
// When changing APIs, we sometimes want to expose unified types that aren't directly tied to any API.
31+
structure ExposedTypes {
32+
QASectionsList: QASectionsList
33+
}
34+
35+
// This API is used simply to expose types
36+
@http(method: "POST", uri: "/notARealEndpoint")
37+
operation ExposeTypes {
38+
output: ExposedTypes
2639
}
2740

2841
// Types
@@ -91,7 +104,7 @@ structure GetContractOutput {
91104
terms: TermsList
92105

93106
@required
94-
qa_sections: QASectionsList
107+
qa_sections: String
95108

96109
@required
97110
isOwner: Boolean
@@ -518,6 +531,7 @@ structure FixedTermValue {
518531
condition: String
519532
}
520533

534+
521535
// Common structures
522536
document Document
523537

python/api_model/types/models.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: api.json
3-
# timestamp: 2025-05-24T20:24:25+00:00
3+
# timestamp: 2025-05-25T00:20:39+00:00
44

55
from __future__ import annotations
66

@@ -207,12 +207,16 @@ class ContractSummaryItem(BaseModel):
207207
sharedEmails: Optional[List[str]] = None
208208

209209

210+
class ExposeTypesResponseContent(BaseModel):
211+
QASectionsList: Optional[List[QASection]] = None
212+
213+
210214
class GetContractResponseContent(BaseModel):
211215
contractId: str = Field(..., pattern='^[A-Za-z0-9-]+$')
212216
name: str
213217
type: ContractType
214218
terms: List[Term]
215-
qa_sections: List[QASection]
219+
qa_sections: str
216220
isOwner: bool
217221
ownerId: str = Field(..., pattern='^[A-Za-z0-9-]+$')
218222
sharedWith: List[SharedWithItem]

typescript/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export type ContractSummaryItem = ExtractSchema<'ContractSummaryItem'>
1818
export type ContractType = ExtractSchema<'ContractType'>
1919
export type DeleteContractRequestContent = ExtractSchema<'DeleteContractRequestContent'>
2020
export type DeleteContractResponseContent = ExtractSchema<'DeleteContractResponseContent'>
21+
export type ExposeTypesResponseContent = ExtractSchema<'ExposeTypesResponseContent'>
2122
export type FixedTermValue = ExtractSchema<'FixedTermValue'>
2223
export type FixedValueTermInference = ExtractSchema<'FixedValueTermInference'>
2324
export type GetContractReadURLRequestContent = ExtractSchema<'GetContractReadURLRequestContent'>

typescript/src/models.ts

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,22 @@ export interface paths {
100100
patch?: never;
101101
trace?: never;
102102
};
103+
"/notARealEndpoint": {
104+
parameters: {
105+
query?: never;
106+
header?: never;
107+
path?: never;
108+
cookie?: never;
109+
};
110+
get?: never;
111+
put?: never;
112+
post: operations["ExposeTypes"];
113+
delete?: never;
114+
options?: never;
115+
head?: never;
116+
patch?: never;
117+
trace?: never;
118+
};
103119
"/ping": {
104120
parameters: {
105121
query?: never;
@@ -228,6 +244,9 @@ export interface components {
228244
DeleteContractResponseContent: {
229245
success: boolean;
230246
};
247+
ExposeTypesResponseContent: {
248+
QASectionsList?: components["schemas"]["QASection"][];
249+
};
231250
FixedTermValue: {
232251
unit: string;
233252
value: string;
@@ -254,7 +273,7 @@ export interface components {
254273
name: string;
255274
type: components["schemas"]["ContractType"];
256275
terms: components["schemas"]["Term"][];
257-
qa_sections: components["schemas"]["QASection"][];
276+
qa_sections: string;
258277
isOwner: boolean;
259278
ownerId: string;
260279
sharedWith: string[];
@@ -630,6 +649,26 @@ export interface operations {
630649
};
631650
};
632651
};
652+
ExposeTypes: {
653+
parameters: {
654+
query?: never;
655+
header?: never;
656+
path?: never;
657+
cookie?: never;
658+
};
659+
requestBody?: never;
660+
responses: {
661+
/** @description ExposeTypes 200 response */
662+
200: {
663+
headers: {
664+
[name: string]: unknown;
665+
};
666+
content: {
667+
"application/json": components["schemas"]["ExposeTypesResponseContent"];
668+
};
669+
};
670+
};
671+
};
633672
Ping: {
634673
parameters: {
635674
query?: never;

0 commit comments

Comments
 (0)