-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python multi namespace #5375
base: main
Are you sure you want to change the base?
Python multi namespace #5375
Changes from all commits
feb80b5
60e4c15
ac2b225
0a391bd
80ea470
d7f6e87
4146dc4
f0d01be
3613073
db6402e
5ea817c
ed61e31
682b381
32399e8
ab818e2
f3f0140
ea246a9
08a68ff
a8dc1d4
089ebcc
59d97c2
bbb5884
9c5f209
d8881d1
5aeb9cf
c8cac2c
b0b1b43
a21d7ad
6c37c0c
d0dcc68
6121243
05309a8
f3d25ff
42f29c9
bf9806d
ab88321
7f88e3e
adf95fe
7c5532c
2781b09
657176d
29c30fd
af457ca
b58ef98
5458bb5
d5b473a
689a06b
4128461
08ca7c7
6aa4203
5700597
49cc526
5b7fe1a
7290a71
c592198
21d8448
851fd6c
b493479
0449f59
85435c3
c8cd8d1
a9bdfa7
06f42b6
34d52e5
87d391e
8f50702
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,9 @@ const EMITTER_OPTIONS: Record<string, Record<string, string> | Record<string, st | |
"client/structure/two-operation-group": { | ||
"package-name": "client-structure-twooperationgroup", | ||
}, | ||
"client/namespace": { | ||
"enable-typespec-namespace": "true", | ||
}, | ||
Comment on lines
+125
to
+127
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for unbranded. shall we always enable it by default? i heard java do that by default and for unbranded, it is reasonable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is generated code for e2e demo allenjzhang/typespec-e2e-demo#51 if we enable typespec namespace. We can see there are additional levels of package structure, which is not intuitive. If SDK users want to call some API, they just need to import client then call it:
However, if they need models, they have to make it clear where the model is:
Compared with before that users can always import any model from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think it is because python does not support initialize the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @iscai-msft / @lmazuel for awareness. |
||
}; | ||
|
||
function toPosix(dir: string): string { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we add some comment for the new config? i believe we should do such clean up with the pr of consolidating emitter's config name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comment for the new flag. And I talked to JS/.NET devs, then they are fine for current name.