-
Notifications
You must be signed in to change notification settings - Fork 75
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
Support hierarchy subpath #2080
Conversation
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.
Initial review for some implementation details to be confirmed.
packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/models.ts
Show resolved
Hide resolved
...ypespec-test/test/openai_generic/generated/typespec-ts/src/api/audio/transcriptions/index.ts
Outdated
Show resolved
Hide resolved
.../typespec-test/test/openai_generic/generated/typespec-ts/src/api/audio/translations/index.ts
Outdated
Show resolved
Hide resolved
packages/typespec-test/test/openai_generic/generated/typespec-ts/src/api/index.ts
Show resolved
Hide resolved
packages/typespec-test/test/openai_generic/generated/typespec-ts/src/api/models/index.ts
Show resolved
Hide resolved
packages/typespec-test/test/openai_generic/generated/typespec-ts/src/api/models/index.ts
Show resolved
Hide resolved
packages/typespec-test/test/openai_generic/generated/typespec-ts/src/OpenAIClient.ts
Outdated
Show resolved
Hide resolved
...ypespec-test/test/openai_generic/generated/typespec-ts/src/api/audio/transcriptions/index.ts
Show resolved
Hide resolved
packages/typespec-test/test/openai_generic/generated/typespec-ts/src/OpenAIClient.ts
Show resolved
Hide resolved
packages/typespec-test/test/openai_generic/generated/typespec-ts/src/OpenAIClient.ts
Show resolved
Hide resolved
packages/typespec-test/test/openai_generic/generated/typespec-ts/src/OpenAIClient.ts
Show resolved
Hide resolved
…l conflicts if detect
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.
Still missing the subpath export info in the package.json
packages/typespec-test/test/openai_generic/generated/typespec-ts/review/openai-generic.api.md
Outdated
Show resolved
Hide resolved
packages/typespec-test/test/openai_generic/generated/typespec-ts/review/openai-generic.api.md
Outdated
Show resolved
Hide resolved
packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/api/b/b/index.ts
Outdated
Show resolved
Hide resolved
packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/rest/models.ts
Show resolved
Hide resolved
...ypespec-test/test/openai_generic/generated/typespec-ts/src/api/audio/transcriptions/index.ts
Outdated
Show resolved
Hide resolved
packages/typespec-test/test/openai_generic/generated/typespec-ts/review/openai-generic.api.md
Outdated
Show resolved
Hide resolved
...ypespec-test/test/openai_generic/generated/typespec-ts/src/api/audio/transcriptions/index.ts
Show resolved
Hide resolved
packages/typespec-test/test/openai_generic/generated/typespec-ts/package.json
Outdated
Show resolved
Hide resolved
packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/FooClient.ts
Show resolved
Hide resolved
* loadtesting-with-hierarchy-false * do not return namespace hierarchies * use interface name when enable operation group in rlc * fix package.json
* loadtesting-with-hierarchy-false * do not return namespace hierarchies * use interface name when enable operation group in rlc * fix package.json * update generic generated files just import order chaneg
* disable-hierarchy-client-and-not-introduce-extra-changes * fix model import issues * reserve work * reserve work * fix hierarchy layer overload * fix generation failure * fall back to enableOperationGroup logic if hierarchyClient is false * fix package.json and api layer export * fix smoke-test
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.
left some reviews after disable hierarchy client in most of the other test cases.
packages/typespec-test/test/loadtesting_modular/generated/typespec-ts/src/index.ts
Outdated
Show resolved
Hide resolved
...ing_modular/generated/typespec-ts/src/loadTestAdministration/LoadTestAdministrationClient.ts
Outdated
Show resolved
Hide resolved
...odularIntegration/generated/client/structure/renamed-operation/src/RenamedOperationClient.ts
Show resolved
Hide resolved
this.query = getQueryOperations(this._client); | ||
this.property = getPropertyOperations(this._client); | ||
this.header = getHeaderOperations(this._client); | ||
this.requestBody = getRequestBodyOperations(this._client); | ||
this.responseBody = getResponseBodyOperations(this._client); |
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.
In the case of hierarchyClient is false, and operationGroup is true, we will just organize the code in the hierarchy way for better documentation purpose, and we will not export the api layer as subpath. @joheredi how do you think ? it should have no api interface change in both classic layer and api layer expect for the change of exporting the operation group operations interface which we have discussed earlier that have to be exported as of the api extractor and the change of operation operations change as I memtioned earlier.
...pec-ts/test/modularIntegration/generated/parameters/collection-format/src/api/query/index.ts
Outdated
Show resolved
Hide resolved
...pec-ts/test/modularIntegration/generated/parameters/collection-format/src/api/query/index.ts
Outdated
Show resolved
Hide resolved
packages/typespec-test/test/chatApi_modular/generated/typespec-ts/package.json
Outdated
Show resolved
Hide resolved
* hierarchy-namespace-in-client-tsp * fix client structure with operations * update smoke-test
fixes #2035 #2066
This PR is for hierarchy client support, document some agreements we have:
hierarchyClient
will be enabled by default, unless it's specified as false.hierarchyClient
is true, we will generate hierarchy client in the classic layer. every namespace and interface will be considered as a layer.hierarchyClient
is true, generate hierarchy client subpath in the api layer. customer will no longer be able to access the deep layered apis from the top ./api subpath export.enableModelNamespace
is true.hierarchyClient
is false andenableOperationGroup
is true, we will just not export the api subpath in that case.hierarchyClient
is false, andenableOperationGroup
is false,enableModelNamespace
is also false, there should be no code change, which can be proved in thosehierarchyClient
false cases.About testing,
I have enabled
hierarchyClient
true for three smoke test,hierarchy_generic
,openai_generic
andwidget_dpg
,And disabled
hierarchyClient
for all the rest smoke tests and modular integration tests. The change for modularIntegration tests are code reorganize as point out in the above point 4. Their API doesn't change which can be proved from no integration tests change.