app:layout_behavior="@string/appbar_scrolling_view_behavior"
<ScrollView android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/trial"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
xmlns:android="http://schemas.android.com/apk/res/android">
----- your code
</ScrollView>
这是片段。它表示在 /cancel:
post:
description: ''
summary: Cancel
operationId: Cancel
produces:
- application/json
parameters:
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/CancelRequest'
- name: Authorization
in: header
required: true
description: ''
schema:
$ref: '#/definitions/Authorization'
- name: Content-Type
in: header
required: true
type: string
description: ''
的行上有一个错误的参数定义。可能是什么问题?
答案 0 :(得分:0)
错误可能会产生误导,问题在于其他参数:
Content-Type
标头应使用consumes
关键字而非参数定义:
/cancel:
post:
consumes:
- application/json
- application/xml
标头参数需要type
(不是schema
)且type
必须是简单类型,且不能是$ref
。所以它应该是:
- name: Authorization
in: header
required: true
description: ''
type: string # <-------
但是,如果是Authorization
标题,您应该使用security definition代替。例如,如果您的API使用基本身份验证:
securityDefinitions:
BasicAuth:
type: basic
paths:
/cancel:
post:
security:
- BasicAuth: []