test: fix dashboard schema validation

This commit is contained in:
zmstone 2024-04-17 13:53:43 +02:00
parent f9f14f9758
commit d49e98bc4b
2 changed files with 8 additions and 6 deletions

View File

@ -100,28 +100,28 @@ gen_schema(connectors) ->
hotconf_schema_json() ->
SchemaInfo = #{
title => <<"EMQX Hot Conf Schema">>,
title => <<"Hot Conf Schema">>,
version => ?SCHEMA_VERSION
},
gen_api_schema_json_iodata(emqx_mgmt_api_configs, SchemaInfo).
bridge_schema_json() ->
SchemaInfo = #{
title => <<"EMQX Data Bridge Schema">>,
title => <<"Data Bridge Schema">>,
version => ?SCHEMA_VERSION
},
gen_api_schema_json_iodata(emqx_bridge_api, SchemaInfo).
actions_schema_json() ->
SchemaInfo = #{
title => <<"EMQX Data Actions and Sources Schema">>,
title => <<"Actions and Sources Schema">>,
version => ?SCHEMA_VERSION
},
gen_api_schema_json_iodata(emqx_bridge_v2_api, SchemaInfo).
connectors_schema_json() ->
SchemaInfo = #{
title => <<"EMQX Connectors Schema">>,
title => <<"Connectors Schema">>,
version => ?SCHEMA_VERSION
},
gen_api_schema_json_iodata(emqx_connector_api, SchemaInfo).

View File

@ -82,8 +82,10 @@ main() {
## The json status feature was added after hotconf and bridges schema API
if [ "$JSON_STATUS" != 'NOT_JSON' ]; then
check_swagger_json
check_schema_json hotconf "EMQX Hot Conf API Schema"
check_schema_json bridges "EMQX Data Bridge API Schema"
check_schema_json hotconf "Hot Conf Schema"
check_schema_json bridges "Data Bridge Schema"
check_schema_json actions "Actions and Sources Schema"
check_schema_json connectors "Connectors Schema"
fi
}