问题描述
我有一个Web API方法,该方法返回PDF文件以及内容类型为application/pdf
。但是,我无法让Power Automate将响应主体公开为动态内容元素。
我确定这与我在swagger文档中描述我的方法的方式有关(请参见下文)。
我该如何写招摇鼓地告诉Power Automate使用响应主体,以便可以将其呈现给(例如)“创建文件(共享点)”操作?我已经将200模式设置为{type: file; format: binary}
,但是我也尝试过自己使用{type: file}
。
swagger: '2.0'
info: {title: xxxxx,version: '1.0',description: xxxxx}
host: xxxxx.azurewebsites.net
basePath: /api
schemes: [https]
consumes: []
produces: []
paths:
/FrontPageGenerator:
post:
description: Output a PDF
operationId: FrontPageGenerator
summary: FrontPageGenerator
parameters:
- in: body
name: FrontPageGeneratorRequestBody
description: Request payload - a json object of FrontPageGenerator data
required: true
schema: {$ref: '#/deFinitions/GenericJson'}
consumes: [application/json]
produces: [application/json,application/pdf]
responses:
'200':
description: Successfully generated PDF
schema: {type: file; format: binary}
headers:
'Content-Type:': {description: 'Content-Type:',type: string}
'Accept:': {description: 'Accept:',type: string}
deFinitions:
GenericJson: {type: object}
parameters: {}
responses: {}
securityDeFinitions: {}
tags: []
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)