0
データの受け渡しに問題があります。スワッガーでボディーに複数のパラメーターを持たせる方法
これはこれはそれ
/GetCustomFieldValues:
post:
parameters:
- name: Param
in: body
description: The custom field value you want to get
required: true
schema:
$ref: "#/definitions/GetCustomFieldValues"
responses:
200:
description: Getting custom field value using name
summary: GetCustomFieldValues
description: GetCustomFieldValues
operationId: GetCustomFieldValues
definitions:
GetCustomFieldValues:
type: object
properties:
pwaUrl:
type: string
projectUid:
type: string
customFieldNames:
type: array
items:
type: string
私はこの方法が働く私のアドバンスト休憩クライアントまたはPowerShellを使用した場合、唯一の違いはどのようにあるため、私の宣言です威張っに
[WebInvoke(UriTemplate = "/GetCustomFieldValues",
Method = "POST",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped)]
Dictionary<string, Object> GetCustomFieldValues(string pwaUrl, string projectUid, List<string> customFieldNames);
私のWCFレスト方法であり、私は体を組み立てる。
スワッガーの場合、私はボディに複数のパラメーターを設定することができないので、定義を使用する必要があります。
私も
CORSはGlobal.asxとweb.configファイルの両方にする必要があり、闊歩WCFについて
schemes:
- http
consumes:
- application/json
produces:
- application/json