我在swagger.yml中有以下服务。编写服务是为了可以多次传递page_id。例如/pages?page_id[]=123&page_id[]=542
我检查了此链接https://swagger.io/specification/,但无法理解如何更新yml,以便可以多次传递id。
我看到我必须设置collectionFormat但不知道如何。
我尝试像下面一样更新它,但没有运气https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md。
它生成的URL,如“ HTTP://本地主机:0000 /页PAGE_ID = 123%2C%20542 `
'/pages':
get:
tags:
-
summary: get the list of pages
operationId: getPages
produces:
- application/json
parameters:
- name: page_id
in: query
description: some description
required: false
type: string
collectionFormat: multi
- name: page_detail
in: query
description: some description
required: false
type: string
responses:
'200':
description: OK
'401':
description: Authentication Failed
'404':
description: Not Found
'503':
description: Service Not Available
Run Code Online (Sandbox Code Playgroud) 如果在T_Referral表上发生任何更新,并且我使用Decrypt函数解密其中一列中的数据,我在触发器中有一个脚本来插入审计表.触发器中的代码是:
DECLARE @Sql_Insert nvarchar(max)
SET @Sql_Insert = ''
SET @Sql_Insert='INSERT INTO [Logg].AuditLogData(TableName, ColumnName, OldValue, OldValue_Decode, NewValue, NewValue_Decode, AuditSubCategoryID,[GuID])
select TableName, ColumnName, OldValue_Decode, case when ColumnName = ''BookingUserReferenceValue'' then utl.sfDecrypt(NewValue,0) Else NewValue end, NewValue_Decode, AuditSubCategoryID,[GuID] from #AuditLogData
where ISNULL(OldValue,'') != ISNULL([NewValue],'')'
exec utl.uspOpenOrCloseEncryptionKey 'open'
exec(@Sql_Insert )
exec utl.uspOpenOrCloseEncryptionKey 'close'
Run Code Online (Sandbox Code Playgroud)
我的更新脚本是
Update RTS.T_Referral
set BookingUserReferenceValue = cast ('John Wayne' as varbinary(256))
where ReferralId = 20
Run Code Online (Sandbox Code Playgroud)
我正在将记录更新John Wayne为T_Referral表中的varbinary (记录看起来像0x4A6F686E205761796E65),并且当调用更新触发器时,它会将该记录作为John Wayne加载到Audit表中.当记录插入BookingUserReferenceValue时,它将被加密.列BookingGserReferenceValue的数据类型是Varbinary(256).当我尝试更新该列中的记录时,我收到错误:
在期望条件的上下文中指定的非布尔类型的表达式,在')'附近.
任何想法都错了吗?谢谢