From 3683ba13eed1a43261e79465123cac84c42f7cbf Mon Sep 17 00:00:00 2001 From: JimMoen Date: Thu, 21 Oct 2021 11:29:46 +0800 Subject: [PATCH] fix(authn): users pagination on spec listener_id and authn_id --- apps/emqx_authn/src/emqx_authn_api.erl | 28 +++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/apps/emqx_authn/src/emqx_authn_api.erl b/apps/emqx_authn/src/emqx_authn_api.erl index faad2fcd8..1b02d37ae 100644 --- a/apps/emqx_authn/src/emqx_authn_api.erl +++ b/apps/emqx_authn/src/emqx_authn_api.erl @@ -886,6 +886,15 @@ list_users_api_spec2() -> Spec = list_users_api_spec(), Spec#{ parameters => [ + #{ + name => id, + in => path, + description => <<"Authenticator id">>, + schema => #{ + type => string + }, + required => true + }, #{ name => listener_id, in => path, @@ -896,13 +905,22 @@ list_users_api_spec2() -> required => true }, #{ - name => id, - in => path, - description => <<"Authenticator id">>, + name => page, + in => query, + description => <<"Page Index">>, schema => #{ - type => string + type => integer }, - required => true + required => false + }, + #{ + name => limit, + in => query, + description => <<"Page limit">>, + schema => #{ + type => integer + }, + required => false } ] }.