anchor.diff:  
   -export([all/0]).
   -export([ to_json_test/1
  -        , add_definition_test/1]).
  +        , add_definition_test/1
  +        , add_definition_array_test/1
  +        ]).
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %% Common test
  
positive.code:    trails:trail("/a/:b/[:c]", handler2, [], Metadata),
     trails:trail("/a", handler3, [], Metadata1)|
     cowboy_swagger_handler:trails()].
  
negative.code: -spec add_definition_test(Config::cowboy_swagger_test_utils:config()) ->
    {comment, string()}.
  add_definition_test(_Config) ->
    %%
    %% Given
    %%
    ct:comment("Add first definition"),
    Name1 = <<"CostumerDefinition">>,
    Properties1 = test_properties_one(),
  
    ct:comment("Add second definition"),
    Name2 = <<"CarDefinition">>,
    Properties2 = test_properties_two(),
  
    %%
    %% When
    %%
    ok = cowboy_swagger:add_definition(Name1, Properties1),
    ok = cowboy_swagger:add_definition(Name2, Properties2),
  
    %%
    %% Then
    %%
    {ok, SwaggerSpec1} = application:get_env(cowboy_swagger, global_spec),
    JsonDefinitions = maps:get(definitions, SwaggerSpec1),
    true = maps:is_key(Name1, JsonDefinitions),
    true = maps:is_key(Name2, JsonDefinitions),
  
    {comment, ""}.
  
  -spec add_definition_array_test(Config::cowboy_swagger_test_utils:config()) ->
    {comment, string()}.
  add_definition_array_test(_Config) ->
    %%
    %% Given
    %%
    ct:comment("Add first definition"),
    Name1 = <<"CostumerDefinition">>,
    Properties1 = test_properties_one(),
  
    ct:comment("Add second definition"),
    Name2 = <<"CarDefinition">>,
    Properties2 = test_properties_two(),
  
    %%
    %% When
    %%
    ok = cowboy_swagger:add_definition_array(Name1, Properties1),
    ok = cowboy_swagger:add_definition_array(Name2, Properties2),
  
    %%
    %% Then
    %%
    {ok, SwaggerSpec1} = application:get_env(cowboy_swagger, global_spec),
    JsonDefinitions = maps:get(definitions, SwaggerSpec1),
    true = maps:is_key(items, maps:get(Name1, JsonDefinitions)),
    true = maps:is_key(items, maps:get(Name2, JsonDefinitions)),
    <<"array">> = maps:get(type, maps:get(Name1, JsonDefinitions)),
    <<"array">> = maps:get(type, maps:get(Name2, JsonDefinitions)),
  
    {comment, ""}.
  
  