Skip to content

Commit

Permalink
allow generate API for Multi content types of internal operation (#2706)
Browse files Browse the repository at this point in the history
* generate multi content types for internal operation

* changelog
  • Loading branch information
msyyc authored Jul 24, 2024
1 parent ca805ac commit db8bda9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .chronus/changes/HEAD-2024-6-18-16-26-24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: feature
packages:
- "@azure-tools/typespec-python"
---

Generate API for multi content types of internal operation
2 changes: 1 addition & 1 deletion packages/typespec-python/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function getImplementation<TServiceOperation extends SdkServiceOperation>
export function isAbstract<TServiceOperation extends SdkServiceOperation>(
method: SdkServiceMethod<TServiceOperation>,
): boolean {
return (method.operation.bodyParam?.contentTypes.length ?? 0) > 1;
return (method.operation.bodyParam?.contentTypes.length ?? 0) > 1 && method.access !== "internal";
}

export function getDelimeterAndExplode(
Expand Down

0 comments on commit db8bda9

Please sign in to comment.