operationSpec.js 630 B

123456789101112131415
  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License. See License.txt in the project root for license information.
  3. import { MapperType } from "./serializer";
  4. export function isStreamOperation(operationSpec) {
  5. var result = false;
  6. for (var statusCode in operationSpec.responses) {
  7. var operationResponse = operationSpec.responses[statusCode];
  8. if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === MapperType.Stream) {
  9. result = true;
  10. break;
  11. }
  12. }
  13. return result;
  14. }
  15. //# sourceMappingURL=operationSpec.js.map