anchor.diff:  	      false
   	  end
         end
  +  end.
  +
  +validate_response_code(Args, Result, Link, Schema) ->
  +  case jsg_jsonschema:propertyValue(Link, "targetSchema") of
  +    undefined -> true;
  +    TargetSchema ->
  +      RealTargetSchema = jsg_links:get_schema(TargetSchema, Schema),
  +      SchemaStatusCode = get_status_code(RealTargetSchema),
  +        case
  +          case SchemaStatusCode of
  +            undefined ->
  +              http_result_code(Result) == 200;
  +            SchemaStatusCode when is_list(SchemaStatusCode) ->
  +              lists:member(http_result_code(Result), SchemaStatusCode);
  +            SchemaStatusCode ->
  +              SchemaStatusCode == http_result_code(Result)
  +            end
  +          of
  +            false ->
  +              io:format
  +                ("~n*** Error: postcondition error: for http call~n~s~n"++
  +                    "the HTTP response code: ~p~n"++
  +                    "expected: ~p~n",
  +                 [format_http_call(Args), SchemaStatusCode, http_result_code(Result)]),
  +              false;
  +           true -> true
  +        end
  +  end.
  +
  +get_status_code(Schema={struct, ListOfValues}) ->
  +  case ListOfValues of
  +    [{<<"oneOf">>, JsonSchemaList}] ->
  +      lists:map(fun(X) -> get_status_code(X) end, JsonSchemaList);
  +     _ ->
  +      jsg_jsonschema:propertyValue(Schema, "status")
     end.
   
   link_next(State,Result,Args) ->
  
positive.code:       false
    end.
  
  validate_call_result_body(Args,Result) ->
    Link = jsg_links:link_def(args_link(Args)),
    Schema = jsg_links:link_schema(args_link(Args)),
    case jsg_jsonschema:propertyValue(Link,"targetSchema") of
      undefined ->
        true;
  
negative.code: postcondition_int(_State,Args,Result) ->
    case validate_call_not_error_result(Args,Result) of
      true ->
        Link = jsg_links:link_def(args_link(Args)),
        Schema = jsg_links:link_schema(args_link(Args)),
        validate_call_result_body(Args, Result, Link, Schema) and
            validate_response_code(Args, Result, Link, Schema);
      _ ->
        io:format("validation failed~n"),
        false
  