addquestion_api.yml 1.3 KB
name: 发布提问
base_url: ${ENV(base_url)}
verify: False
variables:
    currtime: ${make_time()}
    uuid: ${make_uuid()}
    access_token: ${get_accesstoken()}
    sign: ${make_sign($currtime, $uuid, $access_token)}
    title: 最有价值测试${get_second()}
    content: 最有价值测试${get_second()}
request:
    headers:
        Content-Type: application/json;charset=utf-8
        User-Agent: abilityIOSTest/1000012 CFNetwork/1121.2.2 Darwin/19.3.0
        X-MMM-AccessToken: $access_token
        X-MMM-AppName: com.mmm.ability
        X-MMM-AppProject: ability
        X-MMM-DeviceType: '0'
        X-MMM-Sign: $sign
        X-MMM-Timestamp: $currtime
        X-MMM-Uuid: $uuid
        X-MMM-Version: 1.0.0
    json:
        content: $content
        id: 0
        initDep:
            id: 101229
            name: 食品
        pictures:
        -   h: 1334
            path: http://ability-test.fjmaimaimai.com:8899/html/ab/1586654116769645740.jpg
            w: 750
        relatedDeps:
        -   id: 101229
            name: 食品
        selected: true
        title: $title
        way: 1
    method: POST
    url: /v1/question/addQuestion
validate:
    -   eq:
        - content.code
        - 0
    -   eq:
        - content.msg
        - 发布成功